fl399 commited on
Commit
75e7686
1 Parent(s): ce3f2b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -154,7 +154,7 @@ def evaluate(
154
  top_p=0.75,
155
  top_k=40,
156
  num_beams=4,
157
- max_new_tokens=256,
158
  **kwargs,
159
  ):
160
  prompt_0shot = _INSTRUCTION + "\n" + _add_markup(table) + "\n" + "Q: " + question + "\n" + "A:"
@@ -236,15 +236,16 @@ with gr.Blocks(theme=theme) as demo:
236
  output_text = gr.Textbox(lines=8, label="Output")
237
 
238
  gr.Examples(
239
- examples=[["deplot_case_study_m1.png", "What is the sum of numbers of Indonesia and Ireland? Remember to think step by step.", "alpaca-lora"],
240
- ["deplot_case_study_m1.png", "Summarise the chart for me please.", "alpaca-lora"],
241
- ["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step.", "alpaca-lora"],
242
- ["deplot_case_study_4.png", "How many papers are submitted in 2020?", "alpaca-lora"],
243
- ["deplot_case_study_x2.png", "Summarise the chart for me please.", "alpaca-lora"],
244
- ["deplot_case_study_4.png", "How many papers are submitted in 2020?", "flan-ul2"],
245
- ["deplot_case_study_4.png", "acceptance rate = # accepted / #submitted . What is the acceptance rate of 2010?", "flan-ul2"],
246
- ["deplot_case_study_m1.png", "Summarise the chart for me please.", "flan-ul2"],
247
- ],
 
248
  cache_examples=True,
249
  inputs=[input_image, instruction, llm],
250
  outputs=[output_table, output_text],
 
154
  top_p=0.75,
155
  top_k=40,
156
  num_beams=4,
157
+ max_new_tokens=128,
158
  **kwargs,
159
  ):
160
  prompt_0shot = _INSTRUCTION + "\n" + _add_markup(table) + "\n" + "Q: " + question + "\n" + "A:"
 
236
  output_text = gr.Textbox(lines=8, label="Output")
237
 
238
  gr.Examples(
239
+ examples=[
240
+ ["deplot_case_study_m1.png", "What is the sum of numbers of Indonesia and Ireland? Remember to think step by step.", "alpaca-lora"],
241
+ ["deplot_case_study_m1.png", "Summarise the chart for me please.", "alpaca-lora"],
242
+ ["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step.", "alpaca-lora"],
243
+ ["deplot_case_study_4.png", "How many papers are submitted in 2020?", "alpaca-lora"],
244
+ ["deplot_case_study_x2.png", "Summarise the chart for me please.", "alpaca-lora"],
245
+ ["deplot_case_study_4.png", "How many papers are submitted in 2020?", "flan-ul2"],
246
+ ["deplot_case_study_4.png", "acceptance rate = # accepted / #submitted . What is the acceptance rate of 2010?", "flan-ul2"],
247
+ ["deplot_case_study_m1.png", "Summarise the chart for me please.", "flan-ul2"],
248
+ ],
249
  cache_examples=True,
250
  inputs=[input_image, instruction, llm],
251
  outputs=[output_table, output_text],