vioott commited on
Commit
3e8a0c9
·
1 Parent(s): 03f7d90

fix(app): expose app instance for Hugging Face deployment

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -3,17 +3,19 @@ from routes.home import home_bp
3
  from routes.chat import chat_bp
4
  from routes.profile import profile_bp
5
 
6
- app = Flask(__name__)
7
-
8
- app.register_blueprint(home_bp)
9
- app.register_blueprint(chat_bp)
10
- app.register_blueprint(profile_bp)
11
-
12
 
13
  def create_app():
 
 
 
 
 
14
  return app
15
 
16
 
 
 
 
 
17
  if __name__ == '__main__':
18
- app = create_app()
19
- app.run(debug=True)
 
3
  from routes.chat import chat_bp
4
  from routes.profile import profile_bp
5
 
 
 
 
 
 
 
6
 
7
  def create_app():
8
+ """Cria e configura uma instância da aplicação Flask."""
9
+ app = Flask(__name__)
10
+ app.register_blueprint(home_bp)
11
+ app.register_blueprint(chat_bp)
12
+ app.register_blueprint(profile_bp)
13
  return app
14
 
15
 
16
+ # Cria a instância do app para que o Hugging Face possa encontrá-la
17
+ app = create_app()
18
+
19
+ # O bloco abaixo é mantido para permitir a execução local
20
  if __name__ == '__main__':
21
+ app.run(debug=True)