Spaces:
Sleeping
Sleeping
Download app.py from Bosaurus/Constellations: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/spaces/Bosaurus/Constellations/resolve/main/app.py
- Command line
-
hf download hf://spaces/Bosaurus/Constellations/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Bosaurus/Constellations/resolve/main/app.py
490 Bytes
| import cv2 | |
| import numpy as np | |
| import gradio as gr | |
| from ultralytics import YOLO | |
| def predict(path:str): | |
| model = YOLO("yolo11s.yaml") | |
| model = YOLO("constellations_best.pt") | |
| imagen = cv2.imread(path) | |
| results = model.predict(source=path) | |
| for r in results: | |
| return r.plot() | |
| gr.Interface(fn=predict, | |
| inputs=gr.components.Image(type="filepath", label="Input"), | |
| outputs=gr.components.Image(type="numpy", label="Output")).launch(debug=False) |