Spaces:
Sleeping
Sleeping
FALSHEIKHI
commited on
Commit
•
e9c8e3e
1
Parent(s):
a3c3c9c
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,8 @@ def filter_and_rank_by_similarity_sentiment_ranking(query, df, model,cities, k):
|
|
19 |
city=None
|
20 |
try:
|
21 |
city = [word for word in query.split() if word in cities][0]
|
|
|
|
|
22 |
cities = df['locality'].unique()
|
23 |
if city in cities:
|
24 |
df = df.loc[df['locality'] == city]
|
|
|
19 |
city=None
|
20 |
try:
|
21 |
city = [word for word in query.split() if word in cities][0]
|
22 |
+
except:
|
23 |
+
pass
|
24 |
cities = df['locality'].unique()
|
25 |
if city in cities:
|
26 |
df = df.loc[df['locality'] == city]
|