SeyedAli commited on
Commit
b242b72
·
1 Parent(s): 324dbb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -43,11 +43,7 @@ def VQA(image,text):
43
  outputs = VQA_model(**encoding)
44
  logits = outputs.logits
45
  idx = logits.argmax(-1).item()
46
- # output=[]
47
- # for item in VQA_model.config.id2label[idx]:
48
- # output.append(run_en_fa_transaltion_model(item))
49
- #return output
50
- return VQA_model.config.id2label[idx]
51
 
52
  iface = gr.Interface(fn=VQA, inputs=["image","text"], outputs="text")
53
  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])
 
 
 
 
47
 
48
  iface = gr.Interface(fn=VQA, inputs=["image","text"], outputs="text")
49
  iface.launch(share=False)