Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def VQA(image,text):
|
|
43 |
outputs = VQA_model(**encoding)
|
44 |
logits = outputs.logits
|
45 |
idx = logits.argmax(-1).item()
|
46 |
-
return run_en_fa_transaltion_model(VQA_model.config.id2label[idx])
|
47 |
|
48 |
iface = gr.Interface(fn=VQA, inputs=["image","text"], outputs="text")
|
49 |
iface.launch(share=False)
|
|
|
43 |
outputs = VQA_model(**encoding)
|
44 |
logits = outputs.logits
|
45 |
idx = logits.argmax(-1).item()
|
46 |
+
return run_en_fa_transaltion_model(VQA_model.config.id2label[idx])[0]
|
47 |
|
48 |
iface = gr.Interface(fn=VQA, inputs=["image","text"], outputs="text")
|
49 |
iface.launch(share=False)
|