Commit
•
d21554d
1
Parent(s):
2f58a35
Add debug button to display RASA version, Model Name (#6)
Browse files- Add debug button to display RASA version, Model Name (5942b651adc856ea1af30eba80ccd57dc1d6a67f)
Co-authored-by: Anand <[email protected]>
app.py
CHANGED
@@ -47,4 +47,17 @@ if user_input := st.chat_input("What is up?"):
|
|
47 |
message_placeholder.markdown(full_response)
|
48 |
|
49 |
# Add assistant response to chat history
|
50 |
-
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
message_placeholder.markdown(full_response)
|
48 |
|
49 |
# Add assistant response to chat history
|
50 |
+
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
51 |
+
|
52 |
+
# Add debug button to display RASA version, Model Name
|
53 |
+
with st.expander("Debug"):
|
54 |
+
if st.button("Show Debug Info"):
|
55 |
+
url = 'https://omdenalc-omdena-ng-lagos-chatbot-model.hf.space'
|
56 |
+
request_ids = ['/status', '/version']
|
57 |
+
results = [requests.get(url+request_id).json() for request_id in request_ids]
|
58 |
+
st.write(results)
|
59 |
+
else:
|
60 |
+
st.write("")
|
61 |
+
|
62 |
+
|
63 |
+
|