Skip to content

Commit

Permalink
updated app.py to port for render
Browse files Browse the repository at this point in the history
  • Loading branch information
A-R007 committed Dec 23, 2024
1 parent d7f8159 commit ef2b8a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@ def generate():
return jsonify({"error": "Internal Server Error"}), 500

if __name__ == '__main__':
app.run(debug=True)
# Use the PORT environment variable for deployment (default to 5000 for local dev)
port = int(os.environ.get("PORT", 10000))
app.run(debug=False, host="0.0.0.0", port=port)

0 comments on commit ef2b8a6

Please sign in to comment.