theArijitDas commited on
Commit
3aca399
1 Parent(s): fe24b73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ update_validator = Update_Validator(text_model="DistilRoBERTa-v1", image_model="
5
 
6
  def gradio_interface(text1, image1, text2, image2, threshold=0.75):
7
  out = update_validator.validate(text1=text1, image1=image1, text2=text2, image2=image2, threshold=threshold, return_score=True)
8
- return out['score'], label['label']
9
 
10
  inputs = [
11
  gr.components.Textbox(lines=5, label="Description 1"),
@@ -16,7 +16,7 @@ inputs = [
16
  ]
17
 
18
  outputs = [
19
- gr.Textbox(label="Similarity Score"),
20
  gr.Textbox(label="Update Label")
21
  ]
22
 
 
5
 
6
  def gradio_interface(text1, image1, text2, image2, threshold=0.75):
7
  out = update_validator.validate(text1=text1, image1=image1, text2=text2, image2=image2, threshold=threshold, return_score=True)
8
+ return out['score'], "Valid" if label['label'] else "Invalid"
9
 
10
  inputs = [
11
  gr.components.Textbox(lines=5, label="Description 1"),
 
16
  ]
17
 
18
  outputs = [
19
+ gr.Number(label="Similarity Score"),
20
  gr.Textbox(label="Update Label")
21
  ]
22