Fabrice-TIERCELIN commited on
Commit
4987969
1 Parent(s): 292d3f6

Default prompt

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -92,7 +92,7 @@ def check(
92
  raise gr.Error("Please ask for 1, 2 or 3 output files.")
93
 
94
  def update_display(output_number):
95
- return [gr.update(visible = True), gr.update(visible = (2 <= output_number)), gr.update(visible = (output_number == 3))]
96
 
97
  def text2audio(
98
  prompt,
@@ -140,7 +140,7 @@ with gr.Blocks() as interface:
140
  ⚖️ You can use, modify and share the generated sounds but not for commercial uses.
141
  """
142
  )
143
- input_text = gr.Textbox(label = "Prompt", value = "Snort of a horse, best quality", lines = 2, autofocus = True)
144
  with gr.Accordion("Advanced options", open = False):
145
  output_number = gr.Slider(label = "Number of generations", info = "1, 2 or 3 output files", minimum = 1, maximum = 3, value = 1, step = 1, interactive = True)
146
  denoising_steps = gr.Slider(label = "Steps", info = "lower=faster & variant, higher=audio quality & similar", minimum = 100, maximum = 200, value = 100, step = 1, interactive = True)
@@ -161,7 +161,6 @@ with gr.Blocks() as interface:
161
  ], outputs = [], queue = False, show_progress = False).success(fn = update_display, inputs = [
162
  output_number
163
  ], outputs = [
164
- output_audio_1,
165
  output_audio_2,
166
  output_audio_3
167
  ], queue = False, show_progress = False).success(fn = text2audio, inputs = [
 
92
  raise gr.Error("Please ask for 1, 2 or 3 output files.")
93
 
94
  def update_display(output_number):
95
+ return [gr.update(visible = (2 <= output_number)), gr.update(visible = (output_number == 3))]
96
 
97
  def text2audio(
98
  prompt,
 
140
  ⚖️ You can use, modify and share the generated sounds but not for commercial uses.
141
  """
142
  )
143
+ input_text = gr.Textbox(label = "Prompt", value = "Snort of a horse", lines = 2, autofocus = True)
144
  with gr.Accordion("Advanced options", open = False):
145
  output_number = gr.Slider(label = "Number of generations", info = "1, 2 or 3 output files", minimum = 1, maximum = 3, value = 1, step = 1, interactive = True)
146
  denoising_steps = gr.Slider(label = "Steps", info = "lower=faster & variant, higher=audio quality & similar", minimum = 100, maximum = 200, value = 100, step = 1, interactive = True)
 
161
  ], outputs = [], queue = False, show_progress = False).success(fn = update_display, inputs = [
162
  output_number
163
  ], outputs = [
 
164
  output_audio_2,
165
  output_audio_3
166
  ], queue = False, show_progress = False).success(fn = text2audio, inputs = [