Spaces:
Sleeping
Sleeping
Nicolas PHUNG
commited on
Commit
·
bf547e2
1
Parent(s):
dbf8073
fix: Set default space for local mode
Browse files
app.py
CHANGED
|
@@ -17,7 +17,9 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 17 |
and displays the results.
|
| 18 |
"""
|
| 19 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
| 20 |
-
space_id = os.getenv(
|
|
|
|
|
|
|
| 21 |
|
| 22 |
if profile:
|
| 23 |
username = f"{profile.username}"
|
|
@@ -84,6 +86,8 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 84 |
.replace("$", "")
|
| 85 |
.replace(".", "")
|
| 86 |
.replace("St Petersburg", "Saint Petersburg")
|
|
|
|
|
|
|
| 87 |
)
|
| 88 |
answers_payload.append(
|
| 89 |
{"task_id": task_id, "submitted_answer": submitted_answer}
|
|
|
|
| 17 |
and displays the results.
|
| 18 |
"""
|
| 19 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
| 20 |
+
space_id = os.getenv(
|
| 21 |
+
"SPACE_ID", "nsphung/Final_Assignment_Template"
|
| 22 |
+
) # Get the SPACE_ID for sending link to the code
|
| 23 |
|
| 24 |
if profile:
|
| 25 |
username = f"{profile.username}"
|
|
|
|
| 86 |
.replace("$", "")
|
| 87 |
.replace(".", "")
|
| 88 |
.replace("St Petersburg", "Saint Petersburg")
|
| 89 |
+
.replace("USD", "")
|
| 90 |
+
.strip()
|
| 91 |
)
|
| 92 |
answers_payload.append(
|
| 93 |
{"task_id": task_id, "submitted_answer": submitted_answer}
|