Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
from crew import run_crew
|
| 4 |
from utils import get_questions
|
| 5 |
|
| 6 |
-
|
| 7 |
|
| 8 |
def _run(question, openai_api_key, gemini_api_key, file_name = ""):
|
| 9 |
"""
|
|
@@ -50,12 +50,6 @@ def _run(question, openai_api_key, gemini_api_key, file_name = ""):
|
|
| 50 |
|
| 51 |
gr.close_all()
|
| 52 |
|
| 53 |
-
#examples_1 = get_questions(QUESTION_FILE_PATH, 1)
|
| 54 |
-
#examples_2 = get_questions(QUESTION_FILE_PATH, 2)
|
| 55 |
-
#examples_3 = get_questions(QUESTION_FILE_PATH, 3)
|
| 56 |
-
|
| 57 |
-
examples_1, examples_2, examples_3 = get_questions()
|
| 58 |
-
|
| 59 |
with gr.Blocks() as gaia:
|
| 60 |
gr.Markdown("## General AI Assistant 🧠")
|
| 61 |
gr.Markdown(os.environ.get("DESCRIPTION"))
|
|
@@ -114,7 +108,7 @@ with gr.Blocks() as gaia:
|
|
| 114 |
|
| 115 |
gr.Examples(
|
| 116 |
label="Level 1",
|
| 117 |
-
examples=
|
| 118 |
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
| 119 |
outputs=answer,
|
| 120 |
cache_examples=False
|
|
@@ -122,7 +116,7 @@ with gr.Blocks() as gaia:
|
|
| 122 |
|
| 123 |
gr.Examples(
|
| 124 |
label="Level 2",
|
| 125 |
-
examples=
|
| 126 |
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
| 127 |
outputs=answer,
|
| 128 |
cache_examples=False
|
|
@@ -130,7 +124,7 @@ with gr.Blocks() as gaia:
|
|
| 130 |
|
| 131 |
gr.Examples(
|
| 132 |
label="Level 3",
|
| 133 |
-
examples=
|
| 134 |
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
| 135 |
outputs=answer,
|
| 136 |
cache_examples=False
|
|
|
|
| 3 |
from crew import run_crew
|
| 4 |
from utils import get_questions
|
| 5 |
|
| 6 |
+
QUESTION_FILE_PATH = "data/gaia_validation.jsonl"
|
| 7 |
|
| 8 |
def _run(question, openai_api_key, gemini_api_key, file_name = ""):
|
| 9 |
"""
|
|
|
|
| 50 |
|
| 51 |
gr.close_all()
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
with gr.Blocks() as gaia:
|
| 54 |
gr.Markdown("## General AI Assistant 🧠")
|
| 55 |
gr.Markdown(os.environ.get("DESCRIPTION"))
|
|
|
|
| 108 |
|
| 109 |
gr.Examples(
|
| 110 |
label="Level 1",
|
| 111 |
+
examples=get_questions(QUESTION_FILE_PATH, 1),
|
| 112 |
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
| 113 |
outputs=answer,
|
| 114 |
cache_examples=False
|
|
|
|
| 116 |
|
| 117 |
gr.Examples(
|
| 118 |
label="Level 2",
|
| 119 |
+
examples=get_questions(QUESTION_FILE_PATH, 2),
|
| 120 |
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
| 121 |
outputs=answer,
|
| 122 |
cache_examples=False
|
|
|
|
| 124 |
|
| 125 |
gr.Examples(
|
| 126 |
label="Level 3",
|
| 127 |
+
examples=get_questions(QUESTION_FILE_PATH, 3),
|
| 128 |
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
| 129 |
outputs=answer,
|
| 130 |
cache_examples=False
|