Rohit Rajpoot commited on
Commit
3e19cc5
·
1 Parent(s): d6d2d92

add Bayesian simulator button

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -1,17 +1,16 @@
1
  import streamlit as st
2
  from assist.chat import chat as chat_plugin
3
- from assist.heatmap import get_heatmap_figure
4
 
5
  st.title("RepoSage Chatbot Demo")
6
 
7
- # Tab or expander for heatmap
8
- with st.expander("🔢 View Token Similarity Heatmap"):
9
- if st.button("Show Heatmap"):
10
- fig = get_heatmap_figure("tensor.pt")
11
- st.pyplot(fig)
12
-
13
- # Chat UI
14
  question = st.text_input("Ask RepoSage a question:", "")
15
- if st.button("Ask RepoSage"):
16
- response = chat_plugin(question)
17
- st.write(response)
 
 
 
 
 
 
 
1
  import streamlit as st
2
  from assist.chat import chat as chat_plugin
 
3
 
4
  st.title("RepoSage Chatbot Demo")
5
 
6
+ # 1) Change the label to make it obvious we're asking a question
 
 
 
 
 
 
7
  question = st.text_input("Ask RepoSage a question:", "")
8
+
9
+ col1, col2 = st.columns(2)
10
+ with col1:
11
+ if st.button("Ask Embedding RepoSage"):
12
+ st.write(embed_chat(question))
13
+
14
+ with col2:
15
+ if st.button("Ask Bayesian RepoSage"):
16
+ st.write(bayes_chat(question))