Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -162,7 +162,7 @@ def process_document(image, question):
|
|
162 |
#return res + "\n\n" + res.split("A:")[-1]
|
163 |
return [table, res.split("A:")[-1]]
|
164 |
|
165 |
-
description = "Demo for DePlot+LLM for QA and summarisation. To use it, simply upload your image and type a question or instruction 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>"
|
167 |
|
168 |
demo = gr.Interface(
|
@@ -187,6 +187,6 @@ demo = gr.Interface(
|
|
187 |
["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step."],
|
188 |
["deplot_case_study_4.png", "How many papers are submitted in 2020?"],
|
189 |
["deplot_case_study_x2.png", "Summarise the chart for me please."]],
|
190 |
-
cache_examples=
|
191 |
|
192 |
demo.launch()
|
|
|
162 |
#return res + "\n\n" + res.split("A:")[-1]
|
163 |
return [table, res.split("A:")[-1]]
|
164 |
|
165 |
+
description = "Demo for DePlot+LLM for QA and summarisation. The current underlying LLM is [alpaca-lora](https://huggingface.co/spaces/tloen/alpaca-lora). To use it, simply upload your image and type a question or instruction 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>"
|
167 |
|
168 |
demo = gr.Interface(
|
|
|
187 |
["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step."],
|
188 |
["deplot_case_study_4.png", "How many papers are submitted in 2020?"],
|
189 |
["deplot_case_study_x2.png", "Summarise the chart for me please."]],
|
190 |
+
cache_examples=True)
|
191 |
|
192 |
demo.launch()
|