Spaces:
Runtime error
Runtime error
Update app.py
#1
by
Sanket17
- opened
app.py
CHANGED
@@ -13,7 +13,7 @@ from fastapi.responses import HTMLResponse
|
|
13 |
app = FastAPI()
|
14 |
|
15 |
# Load YOLO model and captioning model
|
16 |
-
yolo_model = YOLO('best.pt').to('
|
17 |
|
18 |
# Initialize captioning model (Florence)
|
19 |
processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
|
|
|
13 |
app = FastAPI()
|
14 |
|
15 |
# Load YOLO model and captioning model
|
16 |
+
yolo_model = YOLO('best.pt').to('cuda') # Use 'cuda' if available for GPU
|
17 |
|
18 |
# Initialize captioning model (Florence)
|
19 |
processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
|