File size: 311 Bytes
84a91ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr

from caption import predict_step

with gr.Blocks() as demo:
    image = gr.Image(type='pil', label='Image')
    label = gr.Text(label='Generated Caption')
    image.upload(
        predict_step,
        [image],
        [label]
    )

if __name__ == '__main__':
    demo.launch(share=True)