Spaces:
Runtime error
Runtime error
app.py edit4
Browse files
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 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 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 |
)
|