theArijitDas commited on
Commit
21ca337
·
verified ·
1 Parent(s): 666754e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- gr.inputs.Textbox(lines=5, label="Description 1"),
12
- gr.inputs.Image(label="Image 1"),
13
- gr.inputs.Textbox(lines=5, label="Description 2"),
14
- gr.inputs.Image(label="Image 2"),
15
- gr.inputs.Slider(minimum=0, maximum=1, default=0.75, step=0.01, label="Similarity Threshold")
16
  ]
17
 
18
  outputs = [
19
- gr.outputs.Textbox(label="Similarity Score"),
20
- gr.outputs.Textbox(label="Update Label")
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")