somoncef commited on
Commit
fb7d14b
·
1 Parent(s): 24743d2

feat :/ping endpoint for health check requirements in RapidApi

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -448,6 +448,17 @@ def predict():
448
  'error': 'Internal server error',
449
  'message': str(e)
450
  }), 500
 
 
 
 
 
 
 
 
 
 
 
451
 
452
  @app.route('/health', methods=['GET'])
453
  def health():
 
448
  'error': 'Internal server error',
449
  'message': str(e)
450
  }), 500
451
+
452
+ @app.route('/ping', methods=['GET'])
453
+ def ping():
454
+ """Health check endpoint that returns simple status"""
455
+ return jsonify({
456
+ 'status': 'healthy',
457
+ 'message': 'Skin Analysis API is running',
458
+ 'timestamp': time.time(),
459
+ 'version': '1.0.0',
460
+ 'uptime': 'N/A' # You can calculate uptime if needed
461
+ }), 200
462
 
463
  @app.route('/health', methods=['GET'])
464
  def health():