Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,8 +27,10 @@ else:
|
|
27 |
# Load models from Hugging Face
|
28 |
# ---------------------------
|
29 |
|
30 |
-
# YOLO detection model –
|
31 |
-
|
|
|
|
|
32 |
|
33 |
# QA pipeline (for Ask Eurybia)
|
34 |
qa_pipeline = pipeline("question-answering", model="deepset/roberta-base-squad2")
|
|
|
27 |
# Load models from Hugging Face
|
28 |
# ---------------------------
|
29 |
|
30 |
+
# YOLO detection model – load the .pt file from a Hugging Face repo.
|
31 |
+
# Replace "your-hf-username/your-yolov8-model" and "model.pt" with your actual repo id and filename.
|
32 |
+
yolo_weights_path = hf_hub_download(repo_id="your-hf-username/your-yolov8-model", filename="model.pt")
|
33 |
+
yolo_model = YOLO(yolo_weights_path)
|
34 |
|
35 |
# QA pipeline (for Ask Eurybia)
|
36 |
qa_pipeline = pipeline("question-answering", model="deepset/roberta-base-squad2")
|