tyang commited on
Commit
5850f0c
·
1 Parent(s): ed96b13

gradio why you do

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -59,14 +59,14 @@ def get_scores(text1, text2):
59
  return simcse_out, mpnet_out, fuzz_out, tfidf_out
60
 
61
  inputs = [
62
- gr.inputs.Textbox(lines=5, label="Input Text One"),
63
- gr.inputs.Textbox(lines=5, label="Input Text Two")
64
  ]
65
  outputs = [
66
- gr.outputs.Label(type="confidences",label="Cosine similarity based on SimCSE embeddings"),
67
- gr.outputs.Label(type="confidences",label="Cosine similarity based on stsb-mpnet embeddings"),
68
- gr.outputs.Label(type="confidences",label="Token sort ratio using Levenshtein distance"),
69
- gr.outputs.Label(type="confidences",label="Cosine similarity based on tf-idf vectors"),
70
  ]
71
  title = "SimCSE vs MPNet vs thefuzz vs TF-IDF"
72
  description = "Demo for comparing semantic text similarity methods. Princeton-NLP SimCSE, stsb-mpnet-base-v2 from sentence-transformers (MPnet from Microsoft as the backbone), thefuzz from SeatGeek, and TF-IDF. Interface by Troy Yang."
 
59
  return simcse_out, mpnet_out, fuzz_out, tfidf_out
60
 
61
  inputs = [
62
+ gr.Textbox(lines=5, label="Input Text One"),
63
+ gr.Textbox(lines=5, label="Input Text Two")
64
  ]
65
  outputs = [
66
+ gr.Label(label="Cosine similarity based on SimCSE embeddings"),
67
+ gr.Label(label="Cosine similarity based on stsb-mpnet embeddings"),
68
+ gr.Label(label="Token sort ratio using Levenshtein distance"),
69
+ gr.Label(label="Cosine similarity based on tf-idf vectors"),
70
  ]
71
  title = "SimCSE vs MPNet vs thefuzz vs TF-IDF"
72
  description = "Demo for comparing semantic text similarity methods. Princeton-NLP SimCSE, stsb-mpnet-base-v2 from sentence-transformers (MPnet from Microsoft as the backbone), thefuzz from SeatGeek, and TF-IDF. Interface by Troy Yang."