Spaces:
Runtime error
Runtime error
Commit
•
58572c5
1
Parent(s):
52ccae8
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def predict(image, max_length=64, num_beams=4):
|
|
30 |
model_path = "team-indain-image-caption/hindi-image-captioning"
|
31 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
32 |
# Load model.
|
33 |
-
model = VisionEncoderDecoderModel.from_pretrained(
|
34 |
model.to(device)
|
35 |
print("Loaded model")
|
36 |
feature_extractor = AutoFeatureExtractor.from_pretrained(model_path)
|
|
|
30 |
model_path = "team-indain-image-caption/hindi-image-captioning"
|
31 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
32 |
# Load model.
|
33 |
+
model = VisionEncoderDecoderModel.from_pretrained(model_path)
|
34 |
model.to(device)
|
35 |
print("Loaded model")
|
36 |
feature_extractor = AutoFeatureExtractor.from_pretrained(model_path)
|