Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
|
@@ -12,11 +12,10 @@ def process(input_image, prompt):
|
|
| 12 |
text_input = txt_processors["eval"](prompt)
|
| 13 |
sample = {"image": image, "text_input": [text_input]}
|
| 14 |
|
| 15 |
-
output = model.
|
| 16 |
-
pred_answers = output[
|
| 17 |
-
answer = pred_answers[0]
|
| 18 |
|
| 19 |
-
return
|
| 20 |
|
| 21 |
if __name__ == '__main__':
|
| 22 |
input_image = gr.inputs.Image(label='image', type='pil')
|
|
|
|
| 12 |
text_input = txt_processors["eval"](prompt)
|
| 13 |
sample = {"image": image, "text_input": [text_input]}
|
| 14 |
|
| 15 |
+
output = model.forward_qa(samples=sample)
|
| 16 |
+
pred_answers = output[0]
|
|
|
|
| 17 |
|
| 18 |
+
return pred_answer
|
| 19 |
|
| 20 |
if __name__ == '__main__':
|
| 21 |
input_image = gr.inputs.Image(label='image', type='pil')
|