Update app.py
Browse files
app.py
CHANGED
|
@@ -39,18 +39,18 @@ def invoke(level, question, file_name, ground_truth, openai_api_key, gemini_api_
|
|
| 39 |
|
| 40 |
gr.close_all()
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
| 39 |
|
| 40 |
gr.close_all()
|
| 41 |
|
| 42 |
+
with gr.Blocks() as gaia:
|
| 43 |
+
gr.Radio([1, 2, 3], label="Level", value=int(os.environ["INPUT_LEVEL"]))
|
| 44 |
+
gr.Markdown(label="Question *", value=os.environ["INPUT_QUESTION"])
|
| 45 |
+
gr.Textbox(label="File Name")
|
| 46 |
+
gr.Textbox(label="Ground Truth", value=os.environ["INPUT_GROUND_TRUTH"])
|
| 47 |
+
with gr.Row():
|
| 48 |
+
gr.Textbox(label="OpenAI API Key *", type="password")
|
| 49 |
+
gr.Textbox(label="Gemini API Key *", type="password")
|
| 50 |
+
gr.Textbox(label="Answer", lines=1, interactive=False, value=os.environ["OUTPUT"])
|
| 51 |
+
gr.Markdown("# General AI Assistant - GAIA π€π€π€")
|
| 52 |
+
gr.Markdown(os.environ["DESCRIPTION"])
|
| 53 |
+
|
| 54 |
+
# For examples, you may need to add a custom button or logic
|
| 55 |
+
|
| 56 |
+
gaia.launch()
|