Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import os
|
2 |
from flask import Flask, request, jsonify, send_file, send_from_directory
|
3 |
import google.generativeai as genai
|
4 |
from gtts import gTTS, lang
|
@@ -7,7 +7,6 @@ import soundfile as sf
|
|
7 |
from kokoro import KPipeline
|
8 |
from werkzeug.utils import secure_filename
|
9 |
from flask_cors import CORS
|
10 |
-
import requests
|
11 |
|
12 |
app = Flask(__name__, static_folder='static')
|
13 |
CORS(app)
|
@@ -32,7 +31,7 @@ KOKORO_LANGUAGES = {
|
|
32 |
}
|
33 |
|
34 |
GTTS_LANGUAGES = lang.tts_langs()
|
35 |
-
SUPPORTED_LANGUAGES = sorted(list(KOKORO_LANGUAGES.keys()) + list(GTTS_LANGUAGES.values())
|
36 |
|
37 |
@app.route('/')
|
38 |
def serve_index():
|
|
|
1 |
+
import os
|
2 |
from flask import Flask, request, jsonify, send_file, send_from_directory
|
3 |
import google.generativeai as genai
|
4 |
from gtts import gTTS, lang
|
|
|
7 |
from kokoro import KPipeline
|
8 |
from werkzeug.utils import secure_filename
|
9 |
from flask_cors import CORS
|
|
|
10 |
|
11 |
app = Flask(__name__, static_folder='static')
|
12 |
CORS(app)
|
|
|
31 |
}
|
32 |
|
33 |
GTTS_LANGUAGES = lang.tts_langs()
|
34 |
+
SUPPORTED_LANGUAGES = sorted(list(KOKORO_LANGUAGES.keys()) + list(GTTS_LANGUAGES.values())) # Fixed: Added missing parenthesis
|
35 |
|
36 |
@app.route('/')
|
37 |
def serve_index():
|