gradiotest / app.py
isom5240ust's picture
Update app.py
a81134e verified
raw
history blame contribute delete
635 Bytes
import gradio as gr
from PIL import Image
import time
def process_inputs(image, audio, button_click):
time.sleep(1) # Simulate a delay
return image, audio, "πŸŽ‰ You clicked the button!" if button_click else ""
# Create Gradio Interface
demo = gr.Interface(
fn=process_inputs,
inputs=[
gr.Image(type="pil", label="Upload an image"),
gr.Audio(label="Upload an audio file"),
gr.Button("Click Me")
],
outputs=["image", "audio", "text"],
title="Gradio Demo on Hugging Face",
description="Welcome to a demo app showcasing basic Gradio components!"
)
# Launch the app
demo.launch()