Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ class AgentState(TypedDict):
|
|
| 44 |
is_reversed: bool
|
| 45 |
is_riddle: bool
|
| 46 |
is_python: bool
|
| 47 |
-
|
| 48 |
|
| 49 |
class SuperSmartAgent:
|
| 50 |
def __init__(self):
|
|
@@ -163,8 +163,7 @@ class SuperSmartAgent:
|
|
| 163 |
return state
|
| 164 |
else:
|
| 165 |
# Default fallback
|
| 166 |
-
code =
|
| 167 |
-
"""
|
| 168 |
def calculate():
|
| 169 |
return 5
|
| 170 |
|
|
@@ -189,8 +188,9 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 189 |
and displays the results.
|
| 190 |
"""
|
| 191 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
| 192 |
-
space_id = os.getenv("https://huggingface.co/spaces/selim-ba/Final_Agent_HF_Course/tree/main") # Get the SPACE_ID for sending link to the code
|
| 193 |
-
|
|
|
|
| 194 |
if profile:
|
| 195 |
username= f"{profile.username}"
|
| 196 |
print(f"User logged in: {username}")
|
|
|
|
| 44 |
is_reversed: bool
|
| 45 |
is_riddle: bool
|
| 46 |
is_python: bool
|
| 47 |
+
file_name: str | None
|
| 48 |
|
| 49 |
class SuperSmartAgent:
|
| 50 |
def __init__(self):
|
|
|
|
| 163 |
return state
|
| 164 |
else:
|
| 165 |
# Default fallback
|
| 166 |
+
code = """
|
|
|
|
| 167 |
def calculate():
|
| 168 |
return 5
|
| 169 |
|
|
|
|
| 188 |
and displays the results.
|
| 189 |
"""
|
| 190 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
| 191 |
+
#space_id = os.getenv("https://huggingface.co/spaces/selim-ba/Final_Agent_HF_Course/tree/main") # Get the SPACE_ID for sending link to the code
|
| 192 |
+
space_id = os.getenv("SPACE_ID")
|
| 193 |
+
|
| 194 |
if profile:
|
| 195 |
username= f"{profile.username}"
|
| 196 |
print(f"User logged in: {username}")
|