Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,10 @@ def search_reviews(df, product_description, n=3, pprint=True):
|
|
66 |
print()
|
67 |
return results,product
|
68 |
|
69 |
-
prompt
|
|
|
|
|
|
|
70 |
top_n = st.number_input("How many results do you want to see? : ", min_value = 1)
|
71 |
results,product = search_reviews(df, prompt, top_n)
|
72 |
if st.button("Search Reviews"):
|
|
|
66 |
print()
|
67 |
return results,product
|
68 |
|
69 |
+
if prompt is None:
|
70 |
+
st.write("Please enter any dish to get reviews")
|
71 |
+
else:
|
72 |
+
prompt = st.text_input("What do you want to search for? : ")
|
73 |
top_n = st.number_input("How many results do you want to see? : ", min_value = 1)
|
74 |
results,product = search_reviews(df, prompt, top_n)
|
75 |
if st.button("Search Reviews"):
|