Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,15 @@ import gradio as gr
|
|
| 2 |
import os, threading
|
| 3 |
|
| 4 |
from agents import run_gaia
|
|
|
|
| 5 |
from helper import get_questions
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
lock = threading.Lock()
|
| 8 |
|
| 9 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
@@ -18,7 +25,8 @@ def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
| 18 |
|
| 19 |
try:
|
| 20 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 21 |
-
answer = run_gaia(question, file_name)
|
|
|
|
| 22 |
except Exception as e:
|
| 23 |
raise gr.Error(e)
|
| 24 |
finally:
|
|
|
|
| 2 |
import os, threading
|
| 3 |
|
| 4 |
from agents import run_gaia
|
| 5 |
+
from crew import get_crew
|
| 6 |
from helper import get_questions
|
| 7 |
|
| 8 |
+
###
|
| 9 |
+
LLM_MANAGER = "o1"
|
| 10 |
+
LLM_AGENTS = "gpt-4o"
|
| 11 |
+
VERBOSE = False
|
| 12 |
+
###
|
| 13 |
+
|
| 14 |
lock = threading.Lock()
|
| 15 |
|
| 16 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
|
|
| 25 |
|
| 26 |
try:
|
| 27 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 28 |
+
#answer = run_gaia(question, file_name)
|
| 29 |
+
answer = str(get_crew(LLM_MANAGER, LLM_AGENTS, VERBOSE).kickoff(inputs={"topic": question}))
|
| 30 |
except Exception as e:
|
| 31 |
raise gr.Error(e)
|
| 32 |
finally:
|