Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
from agents.crew import run_crew
|
| 4 |
from utils.utils import get_questions
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name = ""):
|
| 7 |
"""
|
| 8 |
Ask General AI Assistant a question to answer.
|
|
@@ -112,9 +117,6 @@ with gr.Blocks() as gaia:
|
|
| 112 |
inputs=[question, openai_api_key, gemini_api_key, anthropic_api_key, file_name],
|
| 113 |
outputs=answer
|
| 114 |
)
|
| 115 |
-
|
| 116 |
-
QUESTION_FILE_PATH_GAIA = "files/gaia_validation.jsonl"
|
| 117 |
-
QUESTION_FILE_PATH_HLE = "files/hle_validation.jsonl"
|
| 118 |
|
| 119 |
gr.Examples(
|
| 120 |
label="GAIA Benchmark Level 1 Problems",
|
|
@@ -140,12 +142,12 @@ with gr.Blocks() as gaia:
|
|
| 140 |
cache_examples=False
|
| 141 |
)
|
| 142 |
|
| 143 |
-
gr.Examples(
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
)
|
| 150 |
|
| 151 |
gaia.launch(mcp_server=True, share=False, ssr_mode=False)
|
|
|
|
| 1 |
+
# Reference: https://www.gradio.app/guides/quickstart
|
| 2 |
+
|
| 3 |
import os
|
| 4 |
import gradio as gr
|
| 5 |
from agents.crew import run_crew
|
| 6 |
from utils.utils import get_questions
|
| 7 |
|
| 8 |
+
QUESTION_FILE_PATH_GAIA = "files/gaia_validation.jsonl"
|
| 9 |
+
QUESTION_FILE_PATH_HLE = "files/hle_validation.jsonl"
|
| 10 |
+
|
| 11 |
def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name = ""):
|
| 12 |
"""
|
| 13 |
Ask General AI Assistant a question to answer.
|
|
|
|
| 117 |
inputs=[question, openai_api_key, gemini_api_key, anthropic_api_key, file_name],
|
| 118 |
outputs=answer
|
| 119 |
)
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
gr.Examples(
|
| 122 |
label="GAIA Benchmark Level 1 Problems",
|
|
|
|
| 142 |
cache_examples=False
|
| 143 |
)
|
| 144 |
|
| 145 |
+
#gr.Examples(
|
| 146 |
+
# label="Humanity's Last Exam Problems",
|
| 147 |
+
# examples=get_questions(QUESTION_FILE_PATH_HLE),
|
| 148 |
+
# inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key, anthropic_api_key],
|
| 149 |
+
# examples_per_page=5,
|
| 150 |
+
# cache_examples=False
|
| 151 |
+
#)
|
| 152 |
|
| 153 |
gaia.launch(mcp_server=True, share=False, ssr_mode=False)
|