Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from utils import get_questions
|
|
6 |
QUESTION_FILE_PATH = "data/gaia_validation.jsonl"
|
7 |
QUESTION_LEVEL = 1
|
8 |
|
9 |
-
def invoke(question, level,
|
10 |
if not question:
|
11 |
raise gr.Error("Question is required.")
|
12 |
|
@@ -95,7 +95,7 @@ with gr.Blocks(title="GAIA") as gaia:
|
|
95 |
)
|
96 |
with gr.Row():
|
97 |
clear_btn = gr.ClearButton(
|
98 |
-
components=[question, level,
|
99 |
value="Clear"
|
100 |
)
|
101 |
submit_btn = gr.Button("Submit", variant="primary")
|
@@ -109,15 +109,14 @@ with gr.Blocks(title="GAIA") as gaia:
|
|
109 |
|
110 |
submit_btn.click(
|
111 |
fn=invoke,
|
112 |
-
inputs=[question, level,
|
113 |
outputs=answer
|
114 |
)
|
115 |
|
116 |
gr.Examples(
|
117 |
examples=examples,
|
118 |
-
inputs=[question, level,
|
119 |
outputs=answer,
|
120 |
-
fn=invoke,
|
121 |
cache_examples=False
|
122 |
)
|
123 |
|
|
|
6 |
QUESTION_FILE_PATH = "data/gaia_validation.jsonl"
|
7 |
QUESTION_LEVEL = 1
|
8 |
|
9 |
+
def invoke(question, level, ground_truth, file_name, openai_api_key, gemini_api_key):
|
10 |
if not question:
|
11 |
raise gr.Error("Question is required.")
|
12 |
|
|
|
95 |
)
|
96 |
with gr.Row():
|
97 |
clear_btn = gr.ClearButton(
|
98 |
+
components=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
99 |
value="Clear"
|
100 |
)
|
101 |
submit_btn = gr.Button("Submit", variant="primary")
|
|
|
109 |
|
110 |
submit_btn.click(
|
111 |
fn=invoke,
|
112 |
+
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
113 |
outputs=answer
|
114 |
)
|
115 |
|
116 |
gr.Examples(
|
117 |
examples=examples,
|
118 |
+
inputs=[question, level, ground_truth, file_name, openai_api_key, gemini_api_key],
|
119 |
outputs=answer,
|
|
|
120 |
cache_examples=False
|
121 |
)
|
122 |
|