From 3f64aa66590102e5045aa8f488176ae894eec787 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Sat, 31 Jul 2021 20:38:00 +0200 Subject: [PATCH] moved main.app to flask_utils.app --- jarvis/main.py | 3 --- jarvis/utils/flask_utils.py | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/jarvis/main.py b/jarvis/main.py index 2df4cb6..57cba67 100644 --- a/jarvis/main.py +++ b/jarvis/main.py @@ -1,5 +1,4 @@ import lingua_franca -from flask import Flask from jarvis.skills import intent_manager from jarvis.skills.entertainement.jokes import JokesSkill @@ -7,8 +6,6 @@ from jarvis.skills.entertainement.spotify import SpotifySkill from jarvis.skills.research.wikipedia import WikipediaSkill from jarvis.utils import languages_utils, flask_utils -app = Flask(__name__) - if __name__ == '__main__': # Load lingua franca in the memory # Supported : English French German Hungarian Italian Portuguese Swedish diff --git a/jarvis/utils/flask_utils.py b/jarvis/utils/flask_utils.py index e8388d9..3ac66a7 100644 --- a/jarvis/utils/flask_utils.py +++ b/jarvis/utils/flask_utils.py @@ -2,12 +2,13 @@ import json import flask import speech_recognition as sr -from flask import Response, request, jsonify +from flask import Response, request, jsonify, Flask -from jarvis.main import app from jarvis.skills import intent_manager from jarvis.utils import config_utils, languages_utils +app = Flask(__name__) + @app.route("/process", methods=['POST']) def process_request():