mike23415 commited on
Commit
f17599e
·
verified ·
1 Parent(s): 66d27ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -257,6 +257,19 @@ def image_to_base64(image):
257
  img_str = base64.b64encode(buffer.getvalue()).decode()
258
  return f"data:image/png;base64,{img_str}"
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  @app.route('/health', methods=['GET'])
261
  def health_check():
262
  return jsonify({'status': 'healthy', 'message': 'QR AI Service is running'})
@@ -369,4 +382,4 @@ def get_available_styles():
369
 
370
  if __name__ == '__main__':
371
  port = int(os.environ.get('PORT', 7860))
372
- app.run(host='0.0.0.0', port=port, debug=False)
 
257
  img_str = base64.b64encode(buffer.getvalue()).decode()
258
  return f"data:image/png;base64,{img_str}"
259
 
260
+ @app.route('/', methods=['GET'])
261
+ def home():
262
+ return jsonify({
263
+ 'message': 'QR AI Service is running',
264
+ 'status': 'healthy',
265
+ 'endpoints': {
266
+ 'generate': '/api/generate-artistic-qr',
267
+ 'test': '/api/test-compatibility',
268
+ 'styles': '/api/styles',
269
+ 'health': '/health'
270
+ }
271
+ })
272
+
273
  @app.route('/health', methods=['GET'])
274
  def health_check():
275
  return jsonify({'status': 'healthy', 'message': 'QR AI Service is running'})
 
382
 
383
  if __name__ == '__main__':
384
  port = int(os.environ.get('PORT', 7860))
385
+ app.run(host='0.0.0.0', port=port, debug=False)