yusufgundogdu commited on
Commit
78726a5
·
verified ·
1 Parent(s): 4a63d0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -3,16 +3,18 @@ import os
3
 
4
  app = Flask(__name__)
5
 
6
- # Hugging Face'in health check endpointi
7
  @app.route('/')
8
  def home():
9
- return jsonify({"status": "ready", "framework": "Flask"})
 
 
 
 
10
 
11
  @app.route('/health')
12
  def health():
13
  return jsonify({"status": "healthy"})
14
 
15
- # Hugging Face'in özel port ayarı
16
  if __name__ == '__main__':
17
  port = int(os.environ.get('PORT', 8080))
18
- app.run(host='0.0.0.0', port=port, threaded=True, debug=False)
 
3
 
4
  app = Flask(__name__)
5
 
 
6
  @app.route('/')
7
  def home():
8
+ return jsonify({
9
+ "status": "running",
10
+ "message": "Hugging Face Space Backend",
11
+ "environment": os.environ.get('HUGGINGFACE_SPACE_ID', 'local')
12
+ })
13
 
14
  @app.route('/health')
15
  def health():
16
  return jsonify({"status": "healthy"})
17
 
 
18
  if __name__ == '__main__':
19
  port = int(os.environ.get('PORT', 8080))
20
+ app.run(host='0.0.0.0', port=port)