bstraehle commited on
Commit
cbbac96
·
verified ·
1 Parent(s): 3e3790f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -15,6 +15,8 @@ from utils.utils import (
15
 
16
  SPACE_ID = os.environ.get("SPACE_ID")
17
 
 
 
18
  # MCP server functions
19
 
20
  def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name = ""):
@@ -67,8 +69,7 @@ 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 ""
74
 
@@ -86,7 +87,7 @@ DESCRIPTION = (
86
  f"Level 1, 2, 3 and <a href='https://arxiv.org/pdf/2501.14249'>Humanity's Last Exam</a> "
87
  f"problems. To get started with the <strong>GUI</strong>, select from the examples below. "
88
  f"To use via <strong>API</strong> or <strong>MCP</strong>, see the link below. Bring your own API keys. "
89
- f"<a href='https://huggingface.co/spaces/{SPACE_ID}/blob/main/README.md'>Documentation</a></p>"
90
  )
91
 
92
  DEFAULT_QUESTION = "In MCP's 1st Birthday Hackathon, hosted by Anthropic and Gradio, what percentage of participants submitted a solution so far?"
 
15
 
16
  SPACE_ID = os.environ.get("SPACE_ID")
17
 
18
+ BASE_URL = f"https://huggingface.co/spaces/{SPACE_ID}/blob/main/"
19
+
20
  # MCP server functions
21
 
22
  def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name = ""):
 
69
 
70
  def update_file_link(file_name):
71
  if file_name:
72
+ return f"<a href='{BASE_URL}/files/{file_name}' target='_blank'>Open File</a>"
 
73
 
74
  return ""
75
 
 
87
  f"Level 1, 2, 3 and <a href='https://arxiv.org/pdf/2501.14249'>Humanity's Last Exam</a> "
88
  f"problems. To get started with the <strong>GUI</strong>, select from the examples below. "
89
  f"To use via <strong>API</strong> or <strong>MCP</strong>, see the link below. Bring your own API keys. "
90
+ f"<a href='{BASE_URL}/README.md'>Documentation</a></p>"
91
  )
92
 
93
  DEFAULT_QUESTION = "In MCP's 1st Birthday Hackathon, hosted by Anthropic and Gradio, what percentage of participants submitted a solution so far?"