Spaces:
Runtime error
Runtime error
Commit
·
cda7031
1
Parent(s):
05a4bb6
Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,6 @@ def main():
|
|
18 |
repo_files = list_repo_files(repo_id="balacoon/tts")
|
19 |
model_files = [x for x in repo_files if x.endswith("_cpu.addon")]
|
20 |
model_name_dropdown = gr.inputs.Dropdown(label="Model", choices=model_files)
|
21 |
-
model_name = gr.inputs.Dropdown(input_type=model_name_dropdown)
|
22 |
-
|
23 |
speaker = gr.inputs.Dropdown(label="Speaker", choices=[])
|
24 |
|
25 |
def set_model(model_name_str):
|
@@ -36,7 +34,11 @@ def main():
|
|
36 |
speaker.choices = speakers
|
37 |
speaker.value = value
|
38 |
|
39 |
-
model_name.
|
|
|
|
|
|
|
|
|
40 |
|
41 |
file_input = gr.inputs.File(label="Select a PDF File", type="file")
|
42 |
text = gr.outputs.Textbox()
|
|
|
18 |
repo_files = list_repo_files(repo_id="balacoon/tts")
|
19 |
model_files = [x for x in repo_files if x.endswith("_cpu.addon")]
|
20 |
model_name_dropdown = gr.inputs.Dropdown(label="Model", choices=model_files)
|
|
|
|
|
21 |
speaker = gr.inputs.Dropdown(label="Speaker", choices=[])
|
22 |
|
23 |
def set_model(model_name_str):
|
|
|
34 |
speaker.choices = speakers
|
35 |
speaker.value = value
|
36 |
|
37 |
+
model_name = gr.Interface(
|
38 |
+
fn=set_model,
|
39 |
+
inputs=model_name_dropdown,
|
40 |
+
outputs=None
|
41 |
+
)
|
42 |
|
43 |
file_input = gr.inputs.File(label="Select a PDF File", type="file")
|
44 |
text = gr.outputs.Textbox()
|