Advay-Singh commited on
Commit
eb29620
·
verified ·
1 Parent(s): 796cad5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -35,5 +35,6 @@ def ask():
35
  print(f"Error: {e}")
36
  return jsonify({"error": "An error occurred while processing your request."}), 500
37
 
38
- if __name__ == "__main__":
39
- app.run(host="0.0.0.0", port=7860)
 
 
35
  print(f"Error: {e}")
36
  return jsonify({"error": "An error occurred while processing your request."}), 500
37
 
38
+ if __name__ == '__main__':
39
+ port = int(os.environ.get('PORT', 7860))
40
+ app.run(host='0.0.0.0', port=port)