Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -213,25 +213,27 @@ with gr.Blocks() as demo:
|
|
| 213 |
)
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
-
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 217 |
-
|
|
|
|
| 218 |
space_host_startup = os.getenv("SPACE_HOST")
|
| 219 |
-
space_id_startup = os.getenv("SPACE_ID")
|
| 220 |
|
| 221 |
if space_host_startup:
|
| 222 |
print(f"✅ SPACE_HOST found: {space_host_startup}")
|
| 223 |
-
print(f" Runtime URL
|
| 224 |
else:
|
| 225 |
-
print("ℹ️ SPACE_HOST
|
| 226 |
|
| 227 |
-
if space_id_startup:
|
| 228 |
print(f"✅ SPACE_ID found: {space_id_startup}")
|
| 229 |
print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")
|
| 230 |
-
print(f" Repo Tree
|
| 231 |
else:
|
| 232 |
-
print("ℹ️ SPACE_ID
|
| 233 |
-
|
| 234 |
-
print("-"*(60 + len(" App Starting ")) + "\n")
|
| 235 |
|
|
|
|
| 236 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 237 |
-
|
|
|
|
|
|
|
|
|
| 213 |
)
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
+
print("\n" + "-" * 30 + " App Starting " + "-" * 30)
|
| 217 |
+
|
| 218 |
+
# Print helpful startup info
|
| 219 |
space_host_startup = os.getenv("SPACE_HOST")
|
| 220 |
+
space_id_startup = os.getenv("SPACE_ID")
|
| 221 |
|
| 222 |
if space_host_startup:
|
| 223 |
print(f"✅ SPACE_HOST found: {space_host_startup}")
|
| 224 |
+
print(f" Runtime URL: https://{space_host_startup}.hf.space")
|
| 225 |
else:
|
| 226 |
+
print("ℹ️ SPACE_HOST not found. Likely running locally.")
|
| 227 |
|
| 228 |
+
if space_id_startup:
|
| 229 |
print(f"✅ SPACE_ID found: {space_id_startup}")
|
| 230 |
print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")
|
| 231 |
+
print(f" Repo Tree: https://huggingface.co/spaces/{space_id_startup}/tree/main")
|
| 232 |
else:
|
| 233 |
+
print("ℹ️ SPACE_ID not found. Repo URL cannot be determined.")
|
|
|
|
|
|
|
| 234 |
|
| 235 |
+
print("-" * 70)
|
| 236 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 237 |
+
|
| 238 |
+
# Do NOT use share=True in Hugging Face Space
|
| 239 |
+
demo.launch() # Hugging Face handles URL + SSR internally
|