Spaces:
Sleeping
Sleeping
File size: 635 Bytes
122d3f9 a81134e 122d3f9 a81134e 122d3f9 a81134e 122d3f9 a81134e 122d3f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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() |