File size: 684 Bytes
728af28
 
18cdce9
728af28
 
 
 
 
18cdce9
 
 
 
728af28
18cdce9
 
 
 
 
728af28
 
 
18cdce9
728af28
f93f35d
728af28
2c4265a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import gradio as gr

def image_classifier(review_img, product_img):
    width = 30
    height = 50
    return str(width)


product_1 = [None, "./2.jpg"]
product_2 = [None, "./4.jpg"]
product_3 = [None, "./6.jpg"]
product_4 = [None, "./18.jpg"]


image_input1 = gr.Image(type ="filepath",label= "๋ฆฌ๋ทฐ ์ด๋ฏธ์ง€ ์˜ฌ๋ฆฌ์„ธ์š”")
image_input2 = gr.Image(type ="filepath",label= "์•„๋ž˜ ์˜ˆ์‹œ์—์„œ ํด๋ฆญํ•˜์„ธ์š”")

    

demo = gr.Interface(
                    fn=image_classifier,
                    inputs= [image_input1,image_input2],
                    outputs="text",
                    examples = [product_1,product_2,product_3,product_4]
                    )
demo.launch()