bstraehle commited on
Commit
615dca2
·
verified ·
1 Parent(s): 8b5c1fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import os, threading
3
 
4
- from agent import run_agent, get_final_answer
5
  from helper import get_questions
6
 
7
  LEVEL = 1
@@ -24,9 +24,8 @@ def invoke(level, question, file_name, ground_truth, openai_api_key):
24
  with lock:
25
  os.environ["OPENAI_API_KEY"] = openai_api_key
26
  answer = run_agent(level, question, file_name)
27
- final_answer, matches_ground_truth = get_final_answer(question, answer, ground_truth)
28
  del os.environ["OPENAI_API_KEY"]
29
- return final_answer, matches_ground_truth
30
 
31
  gr.close_all()
32
 
 
1
  import gradio as gr
2
  import os, threading
3
 
4
+ from agent import run_agent
5
  from helper import get_questions
6
 
7
  LEVEL = 1
 
24
  with lock:
25
  os.environ["OPENAI_API_KEY"] = openai_api_key
26
  answer = run_agent(level, question, file_name)
 
27
  del os.environ["OPENAI_API_KEY"]
28
+ return answer, (answer == ground_truth)
29
 
30
  gr.close_all()
31