Download src/utils.py from Nasim435/VRE: direct link, hf CLI and curl.
- Browser
- Download file 324 Bytes
-
https://huggingface.co/spaces/Nasim435/VRE/resolve/main/src/utils.py
- Command line
-
hf download hf://spaces/Nasim435/VRE/src/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Nasim435/VRE/resolve/main/src/utils.py
324 Bytes
| from .captioning import generate_caption | |
| from .detection import detect_objects | |
| from .reasoning import reason | |
| def run_pipeline(image, question): | |
| caption = generate_caption(image) | |
| labels, boxes = detect_objects(image) | |
| answer = reason(", ".join(labels), caption, question) | |
| return caption, labels, boxes, answer |