Spaces:
Runtime error
Runtime error
Back to st-tags error
Browse files
server.py
CHANGED
@@ -47,26 +47,26 @@ original_keywords = st.multiselect(
|
|
47 |
["parmesan cheese", "fresh oregano", "basil", "whole wheat flour"]
|
48 |
)
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
# def custom_keywords_on_change():
|
60 |
# pass
|
61 |
|
62 |
|
63 |
-
custom_keywords = st.text_input(
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
custom_keywords = list(set([x.strip() for x in custom_keywords.strip().split(',') if len(x.strip()) > 0]))
|
70 |
|
71 |
all_ingredients = []
|
72 |
all_ingredients.extend(original_keywords)
|
|
|
47 |
["parmesan cheese", "fresh oregano", "basil", "whole wheat flour"]
|
48 |
)
|
49 |
|
50 |
+
st.write("Add custom ingredients here:")
|
51 |
+
custom_keywords = st_tags(
|
52 |
+
label="",
|
53 |
+
text='Press enter to add more',
|
54 |
+
value=['salt'],
|
55 |
+
suggestions=["z"],
|
56 |
+
maxtags=15,
|
57 |
+
key='1')
|
58 |
|
59 |
# def custom_keywords_on_change():
|
60 |
# pass
|
61 |
|
62 |
|
63 |
+
# custom_keywords = st.text_input(
|
64 |
+
# 'Add custom ingredients here (separated by `,`): ',
|
65 |
+
# ", ".join(["salt", "pepper"]),
|
66 |
+
# key="custom_keywords",
|
67 |
+
# # on_change=custom_keywords_on_change,
|
68 |
+
# max_chars=1000)
|
69 |
+
# custom_keywords = list(set([x.strip() for x in custom_keywords.strip().split(',') if len(x.strip()) > 0]))
|
70 |
|
71 |
all_ingredients = []
|
72 |
all_ingredients.extend(original_keywords)
|