Spaces:
Runtime error
Runtime error
Fangyu Liu
commited on
Commit
·
7eb1431
1
Parent(s):
63d9d24
Update app.py
Browse files
app.py
CHANGED
@@ -160,7 +160,8 @@ def process_document(image, question):
|
|
160 |
|
161 |
# send prompt+table to LLM
|
162 |
res = evaluate(table.replace("<0x0A>", "\n"), question)
|
163 |
-
return res + "\n\n" + res.split("A:")[-1]
|
|
|
164 |
|
165 |
description = "Demo for deplot+llm for QA or summarisation. To use it, simply upload your image and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
166 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2212.10505' target='_blank'>DePlot: One-shot visual language reasoning by plot-to-table translation</a></p>"
|
|
|
160 |
|
161 |
# send prompt+table to LLM
|
162 |
res = evaluate(table.replace("<0x0A>", "\n"), question)
|
163 |
+
#return res + "\n\n" + res.split("A:")[-1]
|
164 |
+
return res.split("A:")[-1]
|
165 |
|
166 |
description = "Demo for deplot+llm for QA or summarisation. To use it, simply upload your image and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
167 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2212.10505' target='_blank'>DePlot: One-shot visual language reasoning by plot-to-table translation</a></p>"
|