Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ import easyocr
|
|
17 |
app = FastAPI()
|
18 |
|
19 |
# Load AI Model for Question Answering (DeepSeek-V2-Chat)
|
20 |
-
qa_pipeline = pipeline("text-generation", model="microsoft/phi-2")
|
21 |
|
22 |
# Load Pretrained Object Detection Model (if needed)
|
23 |
model = fasterrcnn_resnet50_fpn(pretrained=True)
|
|
|
17 |
app = FastAPI()
|
18 |
|
19 |
# Load AI Model for Question Answering (DeepSeek-V2-Chat)
|
20 |
+
qa_pipeline = pipeline("text-generation", model="microsoft/phi-2", device=0 if torch.cuda.is_available() else -1)
|
21 |
|
22 |
# Load Pretrained Object Detection Model (if needed)
|
23 |
model = fasterrcnn_resnet50_fpn(pretrained=True)
|