Spaces:
Runtime error
Runtime error
jonathanjordan21
commited on
Commit
•
4d531d5
1
Parent(s):
f52f608
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from transformers import DonutProcessor, VisionEncoderDecoderModel
|
|
9 |
def predict(inp):
|
10 |
|
11 |
# Check GPU
|
12 |
-
|
13 |
|
14 |
# Load processor
|
15 |
processor = DonutProcessor.from_pretrained("jonathanjordan21/donut_fine_tuning_food_composition_id")
|
|
|
9 |
def predict(inp):
|
10 |
|
11 |
# Check GPU
|
12 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
|
14 |
# Load processor
|
15 |
processor = DonutProcessor.from_pretrained("jonathanjordan21/donut_fine_tuning_food_composition_id")
|