Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -167,7 +167,7 @@ def answer_question_from_image(image, question):
|
|
167 |
return "No readable text found in the image."
|
168 |
|
169 |
# Generate answer using AI
|
170 |
-
answer = qa_model(question + " " + img_text, max_length=
|
171 |
return answer
|
172 |
|
173 |
# ---- GRADIO INTERFACES ----
|
|
|
167 |
return "No readable text found in the image."
|
168 |
|
169 |
# Generate answer using AI
|
170 |
+
answer = qa_model(question + " " + img_text, max_length=50)[0]["generated_text"]
|
171 |
return answer
|
172 |
|
173 |
# ---- GRADIO INTERFACES ----
|