import gradio as gr | |
def process_audio_and_strings(audio_file, string1, string2): | |
# This function would process the audio file and strings as needed. | |
# For demonstration, it just returns a confirmation message. | |
return f"Received audio file: {audio_file.name}, and strings: '{string1}', '{string2}'" | |
# Define the Gradio interface | |
iface = gr.Interface( | |
fn=process_audio_and_strings, | |
inputs=[ | |
gr.Audio(type="filepath"), | |
gr.Textbox(label="String 1"), | |
gr.Textbox(label="String 2") | |
], | |
outputs="text" | |
) | |
# Launch the app | |
if __name__ == "__main__": | |
iface.queue(concurrency_count=1, max_size=50).launch() | |