Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,24 +8,29 @@ def run_ultrasinger(opt_i, opt_o, mode, transcription, pitcher, extra, device):
|
|
8 |
|
9 |
# Add options
|
10 |
if opt_i:
|
11 |
-
cmd.extend(["-i", opt_i])
|
12 |
if opt_o:
|
13 |
cmd.extend(["-o", opt_o])
|
14 |
|
15 |
# Add mode
|
16 |
-
|
|
|
17 |
|
18 |
# Add transcription options
|
19 |
-
|
|
|
20 |
|
21 |
# Add pitcher options
|
22 |
-
|
|
|
23 |
|
24 |
# Add extra options
|
25 |
-
|
|
|
26 |
|
27 |
# Add device options
|
28 |
-
|
|
|
29 |
|
30 |
# Execute the command
|
31 |
try:
|
@@ -43,8 +48,8 @@ pitcher = gr.Textbox(label="Pitcher options (e.g., --crepe full)")
|
|
43 |
extra = gr.Textbox(label="Extra options (e.g., --hyphenation True)")
|
44 |
device = gr.Textbox(label="Device options (e.g., --force_cpu False)")
|
45 |
|
46 |
-
output_text = gr.
|
47 |
-
error_text = gr.
|
48 |
|
49 |
# Create Gradio interface
|
50 |
interface = gr.Interface(
|
|
|
8 |
|
9 |
# Add options
|
10 |
if opt_i:
|
11 |
+
cmd.extend(["-i", opt_i.name])
|
12 |
if opt_o:
|
13 |
cmd.extend(["-o", opt_o])
|
14 |
|
15 |
# Add mode
|
16 |
+
if mode:
|
17 |
+
cmd.extend(mode.split())
|
18 |
|
19 |
# Add transcription options
|
20 |
+
if transcription:
|
21 |
+
cmd.extend(transcription.split())
|
22 |
|
23 |
# Add pitcher options
|
24 |
+
if pitcher:
|
25 |
+
cmd.extend(pitcher.split())
|
26 |
|
27 |
# Add extra options
|
28 |
+
if extra:
|
29 |
+
cmd.extend(extra.split())
|
30 |
|
31 |
# Add device options
|
32 |
+
if device:
|
33 |
+
cmd.extend(device.split())
|
34 |
|
35 |
# Execute the command
|
36 |
try:
|
|
|
48 |
extra = gr.Textbox(label="Extra options (e.g., --hyphenation True)")
|
49 |
device = gr.Textbox(label="Device options (e.g., --force_cpu False)")
|
50 |
|
51 |
+
output_text = gr.Textbox(label="Standard Output")
|
52 |
+
error_text = gr.Textbox(label="Error Output")
|
53 |
|
54 |
# Create Gradio interface
|
55 |
interface = gr.Interface(
|