Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 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):
|
|
@@ -26,7 +20,7 @@ def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
| 26 |
try:
|
| 27 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 28 |
#answer = run_gaia(question, file_name)
|
| 29 |
-
answer =
|
| 30 |
except Exception as e:
|
| 31 |
raise gr.Error(e)
|
| 32 |
finally:
|
|
|
|
| 1 |
import gradio as gr
|
| 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 |
lock = threading.Lock()
|
| 9 |
|
| 10 |
def invoke(level, question, file_name, ground_truth, openai_api_key):
|
|
|
|
| 20 |
try:
|
| 21 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 22 |
#answer = run_gaia(question, file_name)
|
| 23 |
+
answer = get_crew().kickoff(inputs={"topic": question}))
|
| 24 |
except Exception as e:
|
| 25 |
raise gr.Error(e)
|
| 26 |
finally:
|