Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -185,8 +185,10 @@ def evaluate(
|
|
185 |
s = generation_output.sequences[0]
|
186 |
output = tokenizer.decode(s)
|
187 |
elif llm == "flan-ul2":
|
188 |
-
|
189 |
-
|
|
|
|
|
190 |
output = res[0]["generated_text"]
|
191 |
elif llm == "gpt-3.5-turbo":
|
192 |
try:
|
@@ -258,10 +260,9 @@ with gr.Blocks(theme="gradio/soft") as demo:
|
|
258 |
|
259 |
gr.Examples(
|
260 |
examples=[
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
#["deplot_case_study_m1.png", "What is the sum of numbers of Indonesia and Ireland? Remember to think step by step.", "alpaca-lora"],
|
266 |
#["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step.", "alpaca-lora"],
|
267 |
#["deplot_case_study_4.png", "How many papers are submitted in 2020?", "flan-ul2"],
|
|
|
185 |
s = generation_output.sequences[0]
|
186 |
output = tokenizer.decode(s)
|
187 |
elif llm == "flan-ul2":
|
188 |
+
try:
|
189 |
+
res = query({"inputs": prompt_0shot})
|
190 |
+
except:
|
191 |
+
output = "<flan-ul2 inference API error - try later>"
|
192 |
output = res[0]["generated_text"]
|
193 |
elif llm == "gpt-3.5-turbo":
|
194 |
try:
|
|
|
260 |
|
261 |
gr.Examples(
|
262 |
examples=[
|
263 |
+
["deplot_case_study_6.png", "Rank the four methods according to average model performances. By how much does deplot outperform the second strongest approach on average across the two sets? Show the computation.", "gpt-3.5-turbo"],
|
264 |
+
["deplot_case_study_4.png", "What are the acceptance rates? And how does the acceptance change over the years?", "gpt-3.5-turbo"],
|
265 |
+
["deplot_case_study_m1.png", "Summarise the chart for me please.", "gpt-3.5-turbo"],
|
|
|
266 |
#["deplot_case_study_m1.png", "What is the sum of numbers of Indonesia and Ireland? Remember to think step by step.", "alpaca-lora"],
|
267 |
#["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step.", "alpaca-lora"],
|
268 |
#["deplot_case_study_4.png", "How many papers are submitted in 2020?", "flan-ul2"],
|