Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,11 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 15 |
"""
|
| 16 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
| 17 |
space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
if profile:
|
| 20 |
username= f"{profile.username}"
|
| 21 |
print(f"User logged in: {username}")
|
|
@@ -33,9 +37,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 33 |
except Exception as e:
|
| 34 |
print(f"Error instantiating agent: {e}")
|
| 35 |
return f"Error initializing agent: {e}", None
|
| 36 |
-
|
| 37 |
-
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
| 38 |
-
print(agent_code)
|
| 39 |
|
| 40 |
# 2. Fetch Questions
|
| 41 |
print(f"Fetching questions from: {questions_url}")
|
|
|
|
| 15 |
"""
|
| 16 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
| 17 |
space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
|
| 18 |
+
|
| 19 |
+
# In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public)
|
| 20 |
+
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
| 21 |
+
print(agent_code)
|
| 22 |
+
|
| 23 |
if profile:
|
| 24 |
username= f"{profile.username}"
|
| 25 |
print(f"User logged in: {username}")
|
|
|
|
| 37 |
except Exception as e:
|
| 38 |
print(f"Error instantiating agent: {e}")
|
| 39 |
return f"Error initializing agent: {e}", None
|
| 40 |
+
|
|
|
|
|
|
|
| 41 |
|
| 42 |
# 2. Fetch Questions
|
| 43 |
print(f"Fetching questions from: {questions_url}")
|