Spaces:
Runtime error
Runtime error
AkhilTolani
commited on
Commit
•
eb76c8e
1
Parent(s):
ba67574
Update app.py
Browse files
app.py
CHANGED
@@ -78,8 +78,8 @@ def generate_audio(prompt, description, seed, temperature, max_length, do_sample
|
|
78 |
(generated_audios, input_ids, prompts)
|
79 |
)
|
80 |
|
81 |
-
# Convert to CPU
|
82 |
-
generated_audios = generated_audios.cpu()
|
83 |
input_ids = input_ids.cpu()
|
84 |
prompts = prompts.cpu()
|
85 |
|
@@ -100,7 +100,7 @@ interface = gr.Interface(
|
|
100 |
gr.Textbox(label="Prompt", value=default_prompt),
|
101 |
gr.Textbox(label="Description", value=default_description),
|
102 |
gr.Textbox(label="Seed", value=default_seed),
|
103 |
-
gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, step=0.1, value=
|
104 |
gr.Slider(label="Max Length", minimum=256, maximum=5120, step=256, value=2580),
|
105 |
gr.Dropdown(label="Do Sample", choices=[True, False], value=True)
|
106 |
],
|
|
|
78 |
(generated_audios, input_ids, prompts)
|
79 |
)
|
80 |
|
81 |
+
# Convert to CPU and float32
|
82 |
+
generated_audios = generated_audios.cpu().float()
|
83 |
input_ids = input_ids.cpu()
|
84 |
prompts = prompts.cpu()
|
85 |
|
|
|
100 |
gr.Textbox(label="Prompt", value=default_prompt),
|
101 |
gr.Textbox(label="Description", value=default_description),
|
102 |
gr.Textbox(label="Seed", value=default_seed),
|
103 |
+
gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, step=0.1, value=0.75),
|
104 |
gr.Slider(label="Max Length", minimum=256, maximum=5120, step=256, value=2580),
|
105 |
gr.Dropdown(label="Do Sample", choices=[True, False], value=True)
|
106 |
],
|