Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,10 @@ from utils.utils import (
|
|
| 11 |
get_dataset
|
| 12 |
)
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# MCP server functions
|
| 15 |
|
| 16 |
def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name = ""):
|
|
@@ -63,8 +67,7 @@ def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name =
|
|
| 63 |
|
| 64 |
def update_file_link(file_name):
|
| 65 |
if file_name:
|
| 66 |
-
|
| 67 |
-
base_url = f"https://huggingface.co/spaces/{space_id}/blob/main/files"
|
| 68 |
return f'<a href="{base_url}/{file_name}" target="_blank">Open File</a>'
|
| 69 |
|
| 70 |
return ""
|
|
@@ -76,6 +79,8 @@ gradio.utils.watchfn_spaces = watchfn
|
|
| 76 |
|
| 77 |
# Graphical user interface
|
| 78 |
|
|
|
|
|
|
|
| 79 |
DEFAULT_QUESTION = "In MCP's 1st Birthday Hackathon, hosted by Anthropic and Gradio, what percentage of participants submitted a solution so far?"
|
| 80 |
|
| 81 |
CSS_FULL_WIDTH = """
|
|
@@ -110,7 +115,7 @@ with gr.Blocks(elem_classes=["full-width-app"]) as gaia:
|
|
| 110 |
with gr.Column(elem_classes=["content-padding"]):
|
| 111 |
gr.Markdown("## General AI Assistant")
|
| 112 |
|
| 113 |
-
gr.Markdown(
|
| 114 |
|
| 115 |
with gr.Row():
|
| 116 |
with gr.Column(scale=3):
|
|
|
|
| 11 |
get_dataset
|
| 12 |
)
|
| 13 |
|
| 14 |
+
# Configuration
|
| 15 |
+
|
| 16 |
+
SPACE_ID = os.environ.get("SPACE_ID", "bstraehle/gaia")
|
| 17 |
+
|
| 18 |
# MCP server functions
|
| 19 |
|
| 20 |
def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name = ""):
|
|
|
|
| 67 |
|
| 68 |
def update_file_link(file_name):
|
| 69 |
if file_name:
|
| 70 |
+
base_url = f"https://huggingface.co/spaces/{SPACE_ID}/blob/main/files"
|
|
|
|
| 71 |
return f'<a href="{base_url}/{file_name}" target="_blank">Open File</a>'
|
| 72 |
|
| 73 |
return ""
|
|
|
|
| 79 |
|
| 80 |
# Graphical user interface
|
| 81 |
|
| 82 |
+
DESCRIPTION = f"<strong>Multi-agent, multi-modal, multi-model AI platform</strong> with high agency, including code generation / execution, browser automation & multi-modal reasoning. The system can solve <a href='https://arxiv.org/pdf/2311.12983'>GAIA Benchmark</a> Level 1, 2, 3 and <a href='https://arxiv.org/pdf/2501.14249'>Humanity's Last Exam</a> problems. To get started with the <strong>GUI</strong>, select from the examples below. To use via <strong>API</strong> or <strong>MCP</strong>, see the link below. Bring your own API keys. <a href='https://huggingface.co/spaces/{SPACE_ID}/blob/main/README.md\''>Documentation</a></p>"
|
| 83 |
+
|
| 84 |
DEFAULT_QUESTION = "In MCP's 1st Birthday Hackathon, hosted by Anthropic and Gradio, what percentage of participants submitted a solution so far?"
|
| 85 |
|
| 86 |
CSS_FULL_WIDTH = """
|
|
|
|
| 115 |
with gr.Column(elem_classes=["content-padding"]):
|
| 116 |
gr.Markdown("## General AI Assistant")
|
| 117 |
|
| 118 |
+
gr.Markdown(DESCRIPTION)
|
| 119 |
|
| 120 |
with gr.Row():
|
| 121 |
with gr.Column(scale=3):
|