Varhal commited on
Commit
e572cfd
·
verified ·
1 Parent(s): 131db93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  # Configuration
2
  # These variables are now mostly for reference, FastAPI/Uvicorn handle port
3
  prod = False
 
4
  port = int(os.environ.get("PORT", 8080)) # Use PORT environment variable provided by Spaces, default to 8080
5
 
6
- import os
7
  import random
8
  import time
9
  import numpy as np
@@ -416,4 +416,3 @@ if __name__ == "__main__":
416
  # The host "0.0.0.0" makes the server accessible externally within the container
417
  # The port is taken from the environment variable PORT, which Hugging Face Spaces sets
418
  uvicorn.run(app, host="0.0.0.0", port=port)
419
-
 
1
  # Configuration
2
  # These variables are now mostly for reference, FastAPI/Uvicorn handle port
3
  prod = False
4
+ import os # Moved import os to the beginning
5
  port = int(os.environ.get("PORT", 8080)) # Use PORT environment variable provided by Spaces, default to 8080
6
 
 
7
  import random
8
  import time
9
  import numpy as np
 
416
  # The host "0.0.0.0" makes the server accessible externally within the container
417
  # The port is taken from the environment variable PORT, which Hugging Face Spaces sets
418
  uvicorn.run(app, host="0.0.0.0", port=port)