Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def fade(audio_data, fade_duration=2, sr=32000):
|
|
32 |
|
33 |
def get_service_port():
|
34 |
service_port = os.environ.get('WAVJOURNEY_SERVICE_PORT')
|
35 |
-
return
|
36 |
|
37 |
with open('config.yaml', 'r') as file:
|
38 |
config = yaml.safe_load(file)
|
@@ -103,9 +103,6 @@ logging.info('VoiceParser is loaded ...')
|
|
103 |
|
104 |
app = Flask(__name__)
|
105 |
|
106 |
-
@app.route('/', methods=['GET'])
|
107 |
-
def root():
|
108 |
-
return "Hello words"
|
109 |
|
110 |
@app.route('/generate_audio', methods=['POST'])
|
111 |
def generate_audio():
|
@@ -253,7 +250,11 @@ def parse_voice():
|
|
253 |
return jsonify({'API error': str(e)}), 500
|
254 |
|
255 |
|
|
|
|
|
|
|
|
|
256 |
if __name__ == '__main__':
|
257 |
service_port = get_service_port()
|
258 |
# We disable multithreading to force services to process one request at a time and avoid CUDA OOM
|
259 |
-
app.run(debug=False, threaded=False, port=
|
|
|
32 |
|
33 |
def get_service_port():
|
34 |
service_port = os.environ.get('WAVJOURNEY_SERVICE_PORT')
|
35 |
+
return 7860
|
36 |
|
37 |
with open('config.yaml', 'r') as file:
|
38 |
config = yaml.safe_load(file)
|
|
|
103 |
|
104 |
app = Flask(__name__)
|
105 |
|
|
|
|
|
|
|
106 |
|
107 |
@app.route('/generate_audio', methods=['POST'])
|
108 |
def generate_audio():
|
|
|
250 |
return jsonify({'API error': str(e)}), 500
|
251 |
|
252 |
|
253 |
+
@app.route('/')
|
254 |
+
def rootFile():
|
255 |
+
return jsonify({'status': 'running'})
|
256 |
+
|
257 |
if __name__ == '__main__':
|
258 |
service_port = get_service_port()
|
259 |
# We disable multithreading to force services to process one request at a time and avoid CUDA OOM
|
260 |
+
app.run(debug=False, threaded=False, port=service_port)
|