PHhTTPS commited on
Commit
4e838b5
·
1 Parent(s): 960140f

Fix: Prevent python proxy from hijacking port 7860 via PORT env var

Browse files
Files changed (1) hide show
  1. freeapis-proxy/server.py +2 -1
freeapis-proxy/server.py CHANGED
@@ -29,5 +29,6 @@ def chat_completions():
29
  })
30
 
31
  if __name__ == '__main__':
32
- port = int(os.environ.get("PORT", 5001))
 
33
  app.run(host='0.0.0.0', port=port)
 
29
  })
30
 
31
  if __name__ == '__main__':
32
+ # Ignore 'PORT' env var to avoid conflict with HF Space default (7860)
33
+ port = int(os.environ.get("FREEAPIS_PORT", 5001))
34
  app.run(host='0.0.0.0', port=port)