Vasudevakrishna commited on
Commit
0930b16
·
verified ·
1 Parent(s): 9bd7c9b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from utils import get_captions
3
+
4
+ # Create a Gradio interface
5
+ iface = gr.Interface(
6
+ fn=get_captions, # Function to be called on user input
7
+ inputs=gr.Image(
8
+ width=416, height=416,
9
+ type="pil", image_mode='RGB', label="Upload Image"
10
+ ),
11
+ outputs=gr.Textbox(
12
+ label="Response from AI Model: ",
13
+ ),
14
+ examples = ['examples/HorseRide.jpg','examples/Car.jpg']
15
+ )
16
+
17
+ # Launch the Gradio app
18
+ iface.launch()