Hammad712 commited on
Commit
507fdbe
Β·
verified Β·
1 Parent(s): 1517b25

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +5 -3
app/main.py CHANGED
@@ -169,13 +169,15 @@ async def internal_error_handler(request, exc):
169
  # ─────────────────────────────────────────────
170
  if __name__ == "__main__":
171
  import uvicorn
172
-
173
  import os
174
 
175
- port = int(os.environ.get("PORT", 8080))
 
 
176
  uvicorn.run(
177
  "app.main:app",
178
  host="0.0.0.0",
179
- port=port
 
180
  )
181
 
 
169
  # ─────────────────────────────────────────────
170
  if __name__ == "__main__":
171
  import uvicorn
 
172
  import os
173
 
174
+ # Default to 7860 (Hugging Face standard) instead of 8080
175
+ port = int(os.environ.get("PORT", 7860))
176
+
177
  uvicorn.run(
178
  "app.main:app",
179
  host="0.0.0.0",
180
+ port=port,
181
+ reload=False # optimizing for production
182
  )
183