Update app.py
Browse files
app.py
CHANGED
@@ -30,4 +30,23 @@ if button:
|
|
30 |
})
|
31 |
|
32 |
# Print the chatbot's response
|
33 |
-
st.write(output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
})
|
31 |
|
32 |
# Print the chatbot's response
|
33 |
+
st.write(output)
|
34 |
+
|
35 |
+
# Create a text input for the chatbot's response
|
36 |
+
chatbot_response = st.text_input("Chatbot's response:")
|
37 |
+
|
38 |
+
# When the user enters a response, call the query function again with the user's response as the payload
|
39 |
+
if chatbot_response:
|
40 |
+
output = query({
|
41 |
+
"inputs": {
|
42 |
+
"source_sentence": chatbot_response,
|
43 |
+
"sentences": [
|
44 |
+
"That is a happy dog",
|
45 |
+
"That is a very happy person",
|
46 |
+
"Today is a sunny day"
|
47 |
+
]
|
48 |
+
},
|
49 |
+
})
|
50 |
+
|
51 |
+
# Print the chatbot's response
|
52 |
+
st.write(output)
|