moved main.app to flask_utils.app

This commit is contained in:
Mathieu B 2021-07-31 20:38:00 +02:00
parent c60f57afd8
commit 3f64aa6659
2 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,4 @@
import lingua_franca import lingua_franca
from flask import Flask
from jarvis.skills import intent_manager from jarvis.skills import intent_manager
from jarvis.skills.entertainement.jokes import JokesSkill 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.skills.research.wikipedia import WikipediaSkill
from jarvis.utils import languages_utils, flask_utils from jarvis.utils import languages_utils, flask_utils
app = Flask(__name__)
if __name__ == '__main__': if __name__ == '__main__':
# Load lingua franca in the memory # Load lingua franca in the memory
# Supported : English French German Hungarian Italian Portuguese Swedish # Supported : English French German Hungarian Italian Portuguese Swedish

View File

@ -2,12 +2,13 @@ import json
import flask import flask
import speech_recognition as sr 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.skills import intent_manager
from jarvis.utils import config_utils, languages_utils from jarvis.utils import config_utils, languages_utils
app = Flask(__name__)
@app.route("/process", methods=['POST']) @app.route("/process", methods=['POST'])
def process_request(): def process_request():