Joachim M. Vis commited on
Commit
776a850
·
verified ·
1 Parent(s): 6ba847c

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
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
- else:
336
-
337
- if space_id_startup: # Print repo URLs if SPACE_ID is found
338
- else:
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)