Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -185,7 +185,9 @@ def evaluate(
|
|
185 |
s = generation_output.sequences[0]
|
186 |
output = tokenizer.decode(s)
|
187 |
elif llm == "flan-ul2":
|
188 |
-
|
|
|
|
|
189 |
elif llm == "gpt-3.5-turbo":
|
190 |
try:
|
191 |
output = get_response_from_openai(prompt_0shot)
|
@@ -256,9 +258,10 @@ with gr.Blocks(theme="gradio/soft") as demo:
|
|
256 |
|
257 |
gr.Examples(
|
258 |
examples=[
|
259 |
-
["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"],
|
260 |
-
["deplot_case_study_4.png", "What are the acceptance rates? And how does the acceptance change over the years?", "gpt-3.5-turbo"],
|
261 |
-
["deplot_case_study_m1.png", "Summarise the chart for me please.", "gpt-3.5-turbo"],
|
|
|
262 |
#["deplot_case_study_m1.png", "What is the sum of numbers of Indonesia and Ireland? Remember to think step by step.", "alpaca-lora"],
|
263 |
#["deplot_case_study_3.png", "By how much did China's growth rate drop? Think step by step.", "alpaca-lora"],
|
264 |
#["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 |
+
res = query({"inputs": prompt_0shot})
|
189 |
+
print (res)
|
190 |
+
output = res[0]["generated_text"]
|
191 |
elif llm == "gpt-3.5-turbo":
|
192 |
try:
|
193 |
output = get_response_from_openai(prompt_0shot)
|
|
|
258 |
|
259 |
gr.Examples(
|
260 |
examples=[
|
261 |
+
#["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"],
|
262 |
+
#["deplot_case_study_4.png", "What are the acceptance rates? And how does the acceptance change over the years?", "gpt-3.5-turbo"],
|
263 |
+
#["deplot_case_study_m1.png", "Summarise the chart for me please.", "gpt-3.5-turbo"],
|
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"],
|