File size: 428 Bytes
3974b9b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
from PIL import Image
from inference import predict_caption

title = "🇻🇳 Vietnamese Image Captioning"
description = "Tải lên một bức ảnh và mô hình sẽ sinh mô tả tiếng Việt tương ứng."

demo = gr.Interface(
    fn=predict_caption,
    inputs=gr.Image(type="pil"),
    outputs="text",
    title=title,
    description=description,
)

if __name__ == "__main__":
    demo.launch()