adowu commited on
Commit
277aa19
·
verified ·
1 Parent(s): 99248ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -73,7 +73,8 @@ async def ask_route():
73
  except Exception as e:
74
  print(f"Error in /api/ask: {e}")
75
  return jsonify({'error': 'Błąd podczas uzyskiwania odpowiedzi', 'details': str(e)}), 500
76
-
 
77
 
78
  # For Hugging Face Spaces, we DO NOT need to run the app with app.run().
79
  # Hugging Face Spaces handles this automatically. The following lines
 
73
  except Exception as e:
74
  print(f"Error in /api/ask: {e}")
75
  return jsonify({'error': 'Błąd podczas uzyskiwania odpowiedzi', 'details': str(e)}), 500
76
+ if __name__ == '__main__':
77
+ app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
78
 
79
  # For Hugging Face Spaces, we DO NOT need to run the app with app.run().
80
  # Hugging Face Spaces handles this automatically. The following lines