File size: 496 Bytes
4adef30
 
612ef10
4adef30
 
 
612ef10
 
 
 
 
4adef30
612ef10
 
4adef30
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import streamlit as st
from assist.chat import chat as chat_plugin
from assist.heatmap import get_heatmap_figure

st.title("RepoSage Chatbot Demo")

# Tab or expander for heatmap
with st.expander("🔢 View Token Similarity Heatmap"):
    if st.button("Show Heatmap"):
        fig = get_heatmap_figure("tensor.pt")
        st.pyplot(fig)

# Chat UI
question = st.text_input("Ask RepoSage a question:", "")
if st.button("Ask RepoSage"):
    response = chat_plugin(question)
    st.write(response)