deepanway commited on
Commit
bcbc444
1 Parent(s): c285708

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -72,8 +72,8 @@ if torch.cuda.is_available():
72
  else:
73
  tango = Tango(device="cpu")
74
 
75
- def gradio_generate(prompt, steps):
76
- output_wave = tango.generate(prompt, int(steps))
77
  output_filename = "temp_output.wav"
78
  wavio.write(output_filename, output_wave, rate=16000, sampwidth=2)
79
 
@@ -86,12 +86,12 @@ TANGO is a latent diffusion model (LDM) for text-to-audio (TTA) generation. TANG
86
  # Gradio input and output components
87
  input_text = gr.inputs.Textbox(lines=2, label="Prompt")
88
  output_audio = gr.outputs.Audio(label="Generated Audio", type="filepath")
89
- denoising_steps = gr.Number(value=100, label="Steps", interactive=True, precision=0)
90
 
91
  # Gradio interface
92
  gr_interface = gr.Interface(
93
  fn=gradio_generate,
94
- inputs=[input_text, denoising_steps],
95
  outputs=[output_audio],
96
  title="TANGO: Text to Audio using Instruction-Guided Diffusion",
97
  description="Generate audio using TANGO by providing a text prompt.",
 
72
  else:
73
  tango = Tango(device="cpu")
74
 
75
+ def gradio_generate(prompt):
76
+ output_wave = tango.generate(prompt)
77
  output_filename = "temp_output.wav"
78
  wavio.write(output_filename, output_wave, rate=16000, sampwidth=2)
79
 
 
86
  # Gradio input and output components
87
  input_text = gr.inputs.Textbox(lines=2, label="Prompt")
88
  output_audio = gr.outputs.Audio(label="Generated Audio", type="filepath")
89
+ # denoising_steps = gr.Number(value=100, label="Steps", interactive=True, precision=0)
90
 
91
  # Gradio interface
92
  gr_interface = gr.Interface(
93
  fn=gradio_generate,
94
+ inputs=[input_text],
95
  outputs=[output_audio],
96
  title="TANGO: Text to Audio using Instruction-Guided Diffusion",
97
  description="Generate audio using TANGO by providing a text prompt.",