Add debug button to display RASA version, Model Name
#6
by
pvanand
- opened
app.py
CHANGED
@@ -42,4 +42,17 @@ if user_input := st.chat_input("What is up?"):
|
|
42 |
message_placeholder.markdown(full_response)
|
43 |
|
44 |
# Add assistant response to chat history
|
45 |
-
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
message_placeholder.markdown(full_response)
|
43 |
|
44 |
# Add assistant response to chat history
|
45 |
+
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
46 |
+
|
47 |
+
# Add debug button to display RASA version, Model Name
|
48 |
+
with st.expander("Debug"):
|
49 |
+
if st.button("Show Debug Info"):
|
50 |
+
url = 'https://omdenalc-omdena-ng-lagos-chatbot-model.hf.space'
|
51 |
+
request_ids = ['/status', '/version']
|
52 |
+
results = [requests.get(url+request_id).json() for request_id in request_ids]
|
53 |
+
st.write(results)
|
54 |
+
else:
|
55 |
+
st.write("")
|
56 |
+
|
57 |
+
|
58 |
+
|