Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,13 +19,10 @@ if st.button('Regenerate Quotes'):
|
|
19 |
quotes_random = quotes.sample(10)
|
20 |
st.write(quotes_random)
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
quotes_search1 = quotes_search[quotes_search['author'].str.contains(search_author, case=False)]
|
30 |
-
quotes_search2 = quotes_search1[quotes_search1['category'].str.contains(search_category, case=False)].head(1000)
|
31 |
-
st.write(quotes_search2)
|
|
|
19 |
quotes_random = quotes.sample(10)
|
20 |
st.write(quotes_random)
|
21 |
|
22 |
+
|
23 |
+
search_term = st.text_input(label='Search Term', value='courage')
|
24 |
+
|
25 |
+
if st.button('Search Quotes'):
|
26 |
+
results = df.query('quote == @search_term')
|
27 |
+
results = results.sample(n=10)
|
28 |
+
st.write(results)
|
|
|
|
|
|