Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -3
src/streamlit_app.py
CHANGED
|
@@ -289,7 +289,7 @@ def get_similar_content(content, n_recommendations=5):
|
|
| 289 |
st.write("Sample row:", sample_data['list'][0])
|
| 290 |
|
| 291 |
# Try finding by show_id first
|
| 292 |
-
query = f'(show_id,eq,
|
| 293 |
params = {
|
| 294 |
"where": query
|
| 295 |
}
|
|
@@ -307,9 +307,9 @@ def get_similar_content(content, n_recommendations=5):
|
|
| 307 |
if response.status_code == 200:
|
| 308 |
data = response.json()
|
| 309 |
if not data.get('list'):
|
| 310 |
-
# If no results with show_id, try by title
|
| 311 |
st.write("🔄 No results with show_id, trying title search...")
|
| 312 |
-
title_query = f'(title,eq,
|
| 313 |
title_params = {
|
| 314 |
"where": title_query
|
| 315 |
}
|
|
|
|
| 289 |
st.write("Sample row:", sample_data['list'][0])
|
| 290 |
|
| 291 |
# Try finding by show_id first
|
| 292 |
+
query = f'where=(show_id,eq,{show_id})' # Remove quotes around show_id
|
| 293 |
params = {
|
| 294 |
"where": query
|
| 295 |
}
|
|
|
|
| 307 |
if response.status_code == 200:
|
| 308 |
data = response.json()
|
| 309 |
if not data.get('list'):
|
| 310 |
+
# If no results with show_id, try by title with modified query
|
| 311 |
st.write("🔄 No results with show_id, trying title search...")
|
| 312 |
+
title_query = f'where=(title,eq,{title})' # Remove quotes here too
|
| 313 |
title_params = {
|
| 314 |
"where": title_query
|
| 315 |
}
|