inbubble commited on
Commit
18cdce9
Β·
1 Parent(s): f93f35d

app.py edit4

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -1,22 +1,25 @@
1
  import gradio as gr
2
 
3
- def image_classifier(review_img,product_img):
4
  width = 30
5
  height = 50
6
  return str(width)
7
 
8
- product_1 = ["./2.jpg"]
9
- product_2 = ["./4.jpg"]
10
- product_3 = ["./6.jpg"]
11
- product_4 = ["./18.jpg"]
12
 
 
 
 
 
13
 
14
- image_input1 = gr.Image(type ="filepath")
15
- image_input2 = gr.Image(type ="filepath", label= "μ•„λž˜ μ˜ˆμ‹œμ—μ„œ ν΄λ¦­ν•˜μ„Έμš”")
 
 
 
16
 
17
  demo = gr.Interface(
18
  fn=image_classifier,
19
- inputs= [image_input1,image_input2],
20
  outputs="text",
21
  examples = [product_1,product_2,product_3,product_4]
22
  )
 
1
  import gradio as gr
2
 
3
+ def image_classifier(review_img, product_img):
4
  width = 30
5
  height = 50
6
  return str(width)
7
 
 
 
 
 
8
 
9
+ product_1 = [None, "./2.jpg"]
10
+ product_2 = [None, "./4.jpg"]
11
+ product_3 = [None, "./6.jpg"]
12
+ product_4 = [None, "./18.jpg"]
13
 
14
+
15
+ image_input1 = gr.Image(type ="filepath",label= "리뷰 이미지 μ˜¬λ¦¬μ„Έμš”")
16
+ image_input2 = gr.Image(type ="filepath",label= "μ•„λž˜ μ˜ˆμ‹œμ—μ„œ ν΄λ¦­ν•˜μ„Έμš”")
17
+
18
+
19
 
20
  demo = gr.Interface(
21
  fn=image_classifier,
22
+ inputs= [image_input1,image_input2],
23
  outputs="text",
24
  examples = [product_1,product_2,product_3,product_4]
25
  )