Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,12 +74,12 @@ class BasicAgent:
|
|
74 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
75 |
space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
|
84 |
api_url = DEFAULT_API_URL
|
85 |
questions_url = f"{api_url}/questions"
|
|
|
74 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
75 |
space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
|
76 |
|
77 |
+
if profile:
|
78 |
+
username= f"{profile.username}"
|
79 |
+
print(f"User logged in: {username}")
|
80 |
+
else:
|
81 |
+
print("User not logged in.")
|
82 |
+
return "Please Login to Hugging Face with the button.", None
|
83 |
|
84 |
api_url = DEFAULT_API_URL
|
85 |
questions_url = f"{api_url}/questions"
|