Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -292,4 +292,8 @@ if __name__ == "__main__":
|
|
| 292 |
load_model()
|
| 293 |
# Use environment variable PORT if available, otherwise default to 7860
|
| 294 |
port = int(os.environ.get("PORT", 7860))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
uvicorn.run(app, host="0.0.0.0", port=port)
|
|
|
|
| 292 |
load_model()
|
| 293 |
# Use environment variable PORT if available, otherwise default to 7860
|
| 294 |
port = int(os.environ.get("PORT", 7860))
|
| 295 |
+
# Add a print statement to clearly show which port is being used
|
| 296 |
+
print(f"Attempting to run Uvicorn on port {port}")
|
| 297 |
+
# The 'address already in use' error is environment-specific, but the code
|
| 298 |
+
# must run on the port dictated by the environment.
|
| 299 |
uvicorn.run(app, host="0.0.0.0", port=port)
|