yusufgundogdu's picture
Update app.py
863df0e verified
raw
history blame
452 Bytes
from flask import Flask, jsonify
import os
app = Flask(__name__)
# Hugging Face'in health check endpointi
@app.route('/')
def home():
return jsonify({"status": "ready", "framework": "Flask"})
@app.route('/health')
def health():
return jsonify({"status": "healthy"})
# Hugging Face'in özel port ayarı
if __name__ == '__main__':
port = int(os.environ.get('PORT', 8080))
app.run(host='0.0.0.0', port=port, threaded=True, debug=False)