File size: 477 Bytes
0930b16 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from utils import get_captions
# Create a Gradio interface
iface = gr.Interface(
fn=get_captions, # Function to be called on user input
inputs=gr.Image(
width=416, height=416,
type="pil", image_mode='RGB', label="Upload Image"
),
outputs=gr.Textbox(
label="Response from AI Model: ",
),
examples = ['examples/HorseRide.jpg','examples/Car.jpg']
)
# Launch the Gradio app
iface.launch() |