Update app.py
Browse files
app.py
CHANGED
@@ -63,38 +63,37 @@ with gr.Blocks(title="General AI Assistant - GAIA 🤖🤝🤖") as gaia:
|
|
63 |
gr.Markdown(f"## {os.environ.get('DESCRIPTION', '')}")
|
64 |
|
65 |
with gr.Row():
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
submit_btn = gr.Button("Submit")
|
98 |
|
99 |
submit_btn.click(
|
100 |
fn=invoke,
|
|
|
63 |
gr.Markdown(f"## {os.environ.get('DESCRIPTION', '')}")
|
64 |
|
65 |
with gr.Row():
|
66 |
+
with gr.Column(scale=2, min_width=400):
|
67 |
+
level = gr.Radio(
|
68 |
+
choices=[1, 2, 3],
|
69 |
+
label="Level",
|
70 |
+
value=int(os.environ.get("INPUT_LEVEL", 1))
|
71 |
+
)
|
72 |
+
question = gr.Textbox(
|
73 |
+
label="Question *",
|
74 |
+
value=os.environ.get("INPUT_QUESTION", "")
|
75 |
+
)
|
76 |
+
file_name = gr.Textbox(label="File Name")
|
77 |
+
ground_truth = gr.Textbox(
|
78 |
+
label="Ground Truth",
|
79 |
+
value=os.environ.get("INPUT_GROUND_TRUTH", "")
|
80 |
+
)
|
81 |
+
openai_api_key = gr.Textbox(
|
82 |
+
label="OpenAI API Key *",
|
83 |
+
type="password"
|
84 |
+
)
|
85 |
+
gemini_api_key = gr.Textbox(
|
86 |
+
label="Gemini API Key *",
|
87 |
+
type="password"
|
88 |
+
)
|
89 |
+
submit_btn = gr.Button("Submit")
|
90 |
+
with gr.Column(scale=1, min_width=300):
|
91 |
+
answer = gr.Textbox(
|
92 |
+
label="Answer",
|
93 |
+
lines=10,
|
94 |
+
interactive=False,
|
95 |
+
value=os.environ.get("OUTPUT", "")
|
96 |
+
)
|
|
|
97 |
|
98 |
submit_btn.click(
|
99 |
fn=invoke,
|