nakas commited on
Commit
054ac98
1 Parent(s): eaa3ef6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -24,10 +24,13 @@ def greet(name, room_size):
24
 
25
  # Define the interface
26
  demo = gr.Interface(fn=greet,
27
- inputs=gr.Audio(type="filepath"),
28
- outputs=gr.Audio(type="filepath"),
29
- # Add a slider for the room size
30
- control_kwargs={"room_size": {"label": "Room size", "min": 0, "max": 1, "step": 0.1}})
31
 
32
  # Launch the interface
33
- demo.launch()
 
 
 
 
 
24
 
25
  # Define the interface
26
  demo = gr.Interface(fn=greet,
27
+ # Use the gr.inputs.Controls input type to add the control_kwargs parameter in the inputs section
28
+ inputs=[gr.inputs.Audio(type="filepath"), gr.inputs.Controls(control_kwargs={"room_size": {"label": "Room size", "min": 0, "max": 1, "step": 0.1}}}),
29
+ outputs=gr.Audio(type="filepath"))
 
30
 
31
  # Launch the interface
32
+ demo.launch()
33
+ This allows you to specify the control_kwargs parameter in the inputs section, along with the other input types. The room_size argument in the greet function is used to update the room_size parameter of the Reverb plugin.
34
+
35
+
36
+