Spaces:
Runtime error
Runtime error
gradio why you do
Browse files
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.
|
| 63 |
-
gr.
|
| 64 |
]
|
| 65 |
outputs = [
|
| 66 |
-
gr.
|
| 67 |
-
gr.
|
| 68 |
-
gr.
|
| 69 |
-
gr.
|
| 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."
|