Spaces:
Sleeping
Sleeping
Joachim M. Vis commited on
Upload app.py
Browse files
app.py
CHANGED
|
@@ -331,11 +331,14 @@ if __name__ == "__main__":
|
|
| 331 |
space_host_startup = os.getenv("SPACE_HOST")
|
| 332 |
space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup
|
| 333 |
|
|
|
|
| 334 |
if space_host_startup:
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
|
|
|
|
|
|
| 341 |
demo.launch(debug=True, share=False)
|
|
|
|
| 331 |
space_host_startup = os.getenv("SPACE_HOST")
|
| 332 |
space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup
|
| 333 |
|
| 334 |
+
# Handle Space host configurations
|
| 335 |
if space_host_startup:
|
| 336 |
+
logger.info(f"Running on Hugging Face Space host: {space_host_startup}")
|
| 337 |
+
|
| 338 |
+
# Print repository URLs if SPACE_ID is available
|
| 339 |
+
if space_id_startup:
|
| 340 |
+
repo_url = f"https://huggingface.co/spaces/{space_id_startup}"
|
| 341 |
+
logger.info(f"Space repository URL: {repo_url}")
|
| 342 |
+
|
| 343 |
+
# Launch the Gradio interface
|
| 344 |
demo.launch(debug=True, share=False)
|