Spaces:
Runtime error
Runtime error
initial setting
Browse files
18.jpg
ADDED
|
2.jpg
ADDED
|
4.jpg
ADDED
|
6.jpg
ADDED
|
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|
| 15 |
+
image_input2 = gr.Image(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 |
+
description="Please enter your text here"
|
| 23 |
+
)
|
| 24 |
+
demo.launch(share=True)
|