Spaces:
Running
Running
Bor Hodošček
commited on
feat: relax threshold
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
# /// script
|
2 |
# requires-python = ">=3.12"
|
3 |
# dependencies = [
|
4 |
-
# "charset-normalizer",
|
5 |
-
# "great-tables",
|
6 |
# "marimo",
|
7 |
-
# "pandas",
|
8 |
# ]
|
9 |
# ///
|
10 |
import marimo
|
@@ -1134,7 +1134,7 @@ def _(file_stack, mo, text_stack):
|
|
1134 |
|
1135 |
|
1136 |
@app.function
|
1137 |
-
def check_text_similarity(text1: str, text2: str, threshold: float = 0.
|
1138 |
"""Check if texts are similar enough based on length and character overlap."""
|
1139 |
if not text1 or not text2:
|
1140 |
return False
|
|
|
1 |
# /// script
|
2 |
# requires-python = ">=3.12"
|
3 |
# dependencies = [
|
4 |
+
# "charset-normalizer==3.4.2",
|
5 |
+
# "great-tables==0.17.0",
|
6 |
# "marimo",
|
7 |
+
# "pandas==2.3.0",
|
8 |
# ]
|
9 |
# ///
|
10 |
import marimo
|
|
|
1134 |
|
1135 |
|
1136 |
@app.function
|
1137 |
+
def check_text_similarity(text1: str, text2: str, threshold: float = 0.1) -> bool:
|
1138 |
"""Check if texts are similar enough based on length and character overlap."""
|
1139 |
if not text1 or not text2:
|
1140 |
return False
|