| from flask import Flask, jsonify | |
| import os | |
| app = Flask(__name__) | |
| # Hugging Face'in health check endpointi | |
| def home(): | |
| return jsonify({"status": "ready", "framework": "Flask"}) | |
| 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) |