import streamlit as st from dotenv import load_dotenv import os # Assuming the GitHubGPT class is in the same directory from RAG import GitHubGPT # Load environment variables load_dotenv() # Initialize the chatbot object gpt_bot = GitHubGPT() # Streamlit UI st.title("GitHubGPT Chatbot") st.write("Interact with your codebase through this RAG-based chatbot!") # User input user_input = st.text_input("Ask a question about the codebase:") if st.button("Get Response"): if user_input: # Get response from the chatbot response = gpt_bot.query(user_input) st.write("Response:", response) else: st.write("Please enter a question.")