Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ import warnings
|
|
38 |
warnings.filterwarnings("ignore", message="Using the model-agnostic default `max_length`")
|
39 |
|
40 |
def qa(image, question):
|
41 |
-
model = BlipForQuestionAnswering.from_pretrained("
|
42 |
-
processor = AutoProcessor.from_pretrained("
|
43 |
|
44 |
inputs = processor(image=image, question=question, return_tensors="pt")
|
45 |
out = model.generate(**inputs)
|
|
|
38 |
warnings.filterwarnings("ignore", message="Using the model-agnostic default `max_length`")
|
39 |
|
40 |
def qa(image, question):
|
41 |
+
model = BlipForQuestionAnswering.from_pretrained("Salesforce/blip-vqa-base")
|
42 |
+
processor = AutoProcessor.from_pretrained("Salesforce/blip-vqa-base")
|
43 |
|
44 |
inputs = processor(image=image, question=question, return_tensors="pt")
|
45 |
out = model.generate(**inputs)
|