Update app.py
Browse files
app.py
CHANGED
|
@@ -7,9 +7,11 @@ nlp = pipeline(
|
|
| 7 |
)
|
| 8 |
|
| 9 |
def predict(img, text):
|
| 10 |
-
|
| 11 |
img,
|
| 12 |
text
|
| 13 |
-
)
|
|
|
|
|
|
|
| 14 |
|
| 15 |
gr.Interface(predict, [gr.Image(type="filepath"), gr.Textbox(label="Question")], gr.Textbox()).launch()
|
|
|
|
| 7 |
)
|
| 8 |
|
| 9 |
def predict(img, text):
|
| 10 |
+
prediction = nlp(
|
| 11 |
img,
|
| 12 |
text
|
| 13 |
+
)
|
| 14 |
+
print(prediction)
|
| 15 |
+
return prediction['answer']
|
| 16 |
|
| 17 |
gr.Interface(predict, [gr.Image(type="filepath"), gr.Textbox(label="Question")], gr.Textbox()).launch()
|