Update app.py
Browse files
app.py
CHANGED
@@ -12,24 +12,12 @@ app = Flask(__name__)
|
|
12 |
|
13 |
# Define the folder where files are saved
|
14 |
file_folder = '/home/app/'
|
15 |
-
|
16 |
# Models with specific character replacements
|
17 |
models_replacements = {
|
18 |
-
|
19 |
-
"model_path": "
|
20 |
-
"replacements": [('
|
21 |
-
},
|
22 |
-
"Español México | Cortana Infinnity": {
|
23 |
-
"model_path": "es_MX-cortana-19669-epoch-high.onnx",
|
24 |
-
"replacements": [('(', ','), (')', ','), ('?', ','), ('¿', ','), (':', ','), ('\n', ' ')]
|
25 |
-
},
|
26 |
-
"Español México | TheGevy": {
|
27 |
-
"model_path": "es_MX-gevy-10196-epoch-high.onnx",
|
28 |
-
"replacements": [('(', ','), (')', ','), ('?', ','), ('¿', ','), (':', ','), ('\n', ' ')]
|
29 |
-
},
|
30 |
-
"English US | Voice": {
|
31 |
-
"model_path": "en_US-ljspeech-high.onnx",
|
32 |
-
"replacements": [('(', ','), (')', ','), ('?', ','), ('¿', ','), (':', ','), ('\n', ' ')]
|
33 |
}
|
34 |
}
|
35 |
|
|
|
12 |
|
13 |
# Define the folder where files are saved
|
14 |
file_folder = '/home/app/'
|
15 |
+
model_name = os.getenv('MODELNAME')
|
16 |
# Models with specific character replacements
|
17 |
models_replacements = {
|
18 |
+
model_name: {
|
19 |
+
"model_path": model_name + ".onnx",
|
20 |
+
"replacements": [(')', ','), ('\n', ' ')]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
}
|
23 |
|