Spaces:
Sleeping
Sleeping
shaneperry0101
commited on
fix(test): find bug
Browse files
app.py
CHANGED
@@ -13,21 +13,21 @@ if 'conversation' not in st.session_state:
|
|
13 |
st.title("Chatbot Application")
|
14 |
user_input = st.text_input("You:", key="input")
|
15 |
|
16 |
-
if st.button("Send"):
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
# Display the conversation
|
29 |
-
for message in st.session_state.conversation:
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
13 |
st.title("Chatbot Application")
|
14 |
user_input = st.text_input("You:", key="input")
|
15 |
|
16 |
+
# if st.button("Send"):
|
17 |
+
# if user_input:
|
18 |
+
# # Append user input to the conversation
|
19 |
+
# st.session_state.conversation.append({"role": "user", "content": user_input})
|
20 |
+
|
21 |
+
# # Generate response
|
22 |
+
# response = chatbot(user_input)
|
23 |
+
# bot_response = response[0]['generated_text']
|
24 |
+
|
25 |
+
# # Append bot response to the conversation
|
26 |
+
# st.session_state.conversation.append({"role": "bot", "content": bot_response})
|
27 |
+
|
28 |
+
# # Display the conversation
|
29 |
+
# for message in st.session_state.conversation:
|
30 |
+
# if message["role"] == "user":
|
31 |
+
# st.text_area("You:", value=message["content"], key=f"user_{message['content']}", height=50)
|
32 |
+
# else:
|
33 |
+
# st.text_area("Bot:", value=message["content"], key=f"bot_{message['content']}", height=50)
|