Update app.py
Browse files
app.py
CHANGED
@@ -8,16 +8,16 @@ def gradio_interface(text1, image1, text2, image2, threshold=0.75):
|
|
8 |
return out['score'], label['label']
|
9 |
|
10 |
inputs = [
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
]
|
17 |
|
18 |
outputs = [
|
19 |
-
gr.
|
20 |
-
gr.
|
21 |
]
|
22 |
|
23 |
iface = gr.Interface(fn=gradio_interface, inputs=inputs, outputs=outputs, title="Product Update Validator")
|
|
|
8 |
return out['score'], label['label']
|
9 |
|
10 |
inputs = [
|
11 |
+
grcomponents.Textbox(lines=5, label="Description 1"),
|
12 |
+
grcomponents.Image(label="Image 1"),
|
13 |
+
grcomponents.Textbox(lines=5, label="Description 2"),
|
14 |
+
grcomponents.Image(label="Image 2"),
|
15 |
+
grcomponents.Slider(minimum=0, maximum=1, default=0.75, step=0.01, label="Similarity Threshold")
|
16 |
]
|
17 |
|
18 |
outputs = [
|
19 |
+
gr.components.Textbox(label="Similarity Score"),
|
20 |
+
gr.components.Textbox(label="Update Label")
|
21 |
]
|
22 |
|
23 |
iface = gr.Interface(fn=gradio_interface, inputs=inputs, outputs=outputs, title="Product Update Validator")
|