Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import logging | |
| st.markdown("<h1 style='text-align: center; color: #666666;'>Vector Database RAG Proof of Concept</h1>", unsafe_allow_html=True) | |
| st.markdown("<h6 style='text-align: center; color: #666666;'>V1</h6>", unsafe_allow_html=True) | |
| logger = logging.getLogger(__name__) | |
| logging.basicConfig(level=logging.DEBUG) | |
| def runLLM(prompt): | |
| log.debug("### runLLM") | |
| result = "" | |
| return(result) | |
| def setPrompt(pprompt,ragFlag): | |
| log.debug("### setPrompt") | |
| userPrompt = "" | |
| return userPrompt | |
| def on_submitButton_clicked(b): | |
| log.debug("### on_submitButton_clicked") | |
| setPrompt("","") | |
| runLLM(prompt) | |
| ###################################################################### | |
| # MAINLINE | |
| # | |
| logger.info("#### MAINLINE ENTERED.") | |
| systemTextArea = st.empty() | |
| userTextArea = st.empty() | |
| ragPromptTextArea = st.empty() | |
| responseTextArea = st.empty() | |
| selectRag = st.checkbox("Enable Query With RAG",value=False,key="selectRag",help=None,on_change=None,args=None,kwargs=None,disabled=False,label_visibility="visible") | |
| submitButton = st.button("Run LLM",key=None,help=None,on_click=on_submitButton_clicked,args=None,kwargs=None,type="secondary",disabled=False,use_container_width=False) | |
| #logger.info("\n### Before calling submitButton.on_click().") | |
| #submitButton.on_click(on_submitButton_clicked) | |