Spaces:
Sleeping
Sleeping
JaiPatel4717
commited on
Commit
•
eb56443
1
Parent(s):
03444e8
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,9 @@ st.title("Nutrition Chatbot")
|
|
16 |
user_input = st.text_input("Ask me about nutrition:")
|
17 |
|
18 |
if user_input:
|
19 |
-
#
|
20 |
-
inputs = tokenizer.
|
|
|
21 |
input_ids = inputs['input_ids']
|
22 |
attention_mask = inputs['attention_mask']
|
23 |
|
|
|
16 |
user_input = st.text_input("Ask me about nutrition:")
|
17 |
|
18 |
if user_input:
|
19 |
+
# Use encode_plus to get both input_ids and attention_mask
|
20 |
+
inputs = tokenizer.encode_plus(user_input, return_tensors="pt", padding=True, truncation=True)
|
21 |
+
|
22 |
input_ids = inputs['input_ids']
|
23 |
attention_mask = inputs['attention_mask']
|
24 |
|