Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
3b9e0c5
1
Parent(s):
b4cb87b
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def refinar_resultados(df):
|
|
40 |
|
41 |
def get_best_match(query, choices, limit=15):
|
42 |
matches = process.extract(query, choices, scorer=fuzz.WRatio, limit=limit)
|
43 |
-
return [match[0] for match in matches if match[1] >
|
44 |
|
45 |
def filtrar_itens_similares(df, termo_pesquisa, limit=15):
|
46 |
titulos = df['Title'].tolist()
|
@@ -87,7 +87,7 @@ def select_nearest_items(df):
|
|
87 |
if row['Marketplace'] not in included_marketplaces:
|
88 |
nearest_items.append(row)
|
89 |
included_marketplaces.add(row['Marketplace'])
|
90 |
-
if len(included_marketplaces) >=
|
91 |
break
|
92 |
|
93 |
return pd.DataFrame(nearest_items)
|
|
|
40 |
|
41 |
def get_best_match(query, choices, limit=15):
|
42 |
matches = process.extract(query, choices, scorer=fuzz.WRatio, limit=limit)
|
43 |
+
return [match[0] for match in matches if match[1] > 30]
|
44 |
|
45 |
def filtrar_itens_similares(df, termo_pesquisa, limit=15):
|
46 |
titulos = df['Title'].tolist()
|
|
|
87 |
if row['Marketplace'] not in included_marketplaces:
|
88 |
nearest_items.append(row)
|
89 |
included_marketplaces.add(row['Marketplace'])
|
90 |
+
if len(included_marketplaces) >= 5:
|
91 |
break
|
92 |
|
93 |
return pd.DataFrame(nearest_items)
|