Spaces:
Build error
Build error
Jesus Sanchez commited on
Commit ·
82afe3d
1
Parent(s): 1d53447
trying with tab container
Browse files163 unmodified lines164165166167168169163 unmodified lineswith st.sidebar:st.markdown(sidebar_text)prompt = chat.get_promt("Ask IDF Anything")with st.container():chat.get_input(prompt, get_response, llm)163 unmodified lines164165166167168169170171163 unmodified lineswith st.sidebar:st.markdown(sidebar_text)[tab] = st.tabs(["AskIDF"])prompt = chat.get_promt("Ask IDF Anything")with tab:chat.process(prompt, get_response, llm)
20 unmodified lines212223242526272829303132333420 unmodified linesst.session_state[TEXT_INPUT_LABEL] = ''def get_promt(self, placeholder: str):return st.text_input(label="ChatIDF",placeholder=placeholder,key="chat_widget",)# return st.chat_input(placeholder=placeholder)def get_input(self, prompt: str, process_prompt: Callable, *args):"""process_prompt(promt: str, *args) -> tuple(Any, Callable)callback to process the chat promt, it takes the promt for input20 unmodified lines212223242526272829303132333420 unmodified linesst.session_state[TEXT_INPUT_LABEL] = ''def get_promt(self, placeholder: str):# return st.text_input(# label="ChatIDF",# placeholder=placeholder,# key="chat_widget",# )return st.chat_input(placeholder=placeholder)def process(self, prompt: str, process_prompt: Callable, *args):"""process_prompt(promt: str, *args) -> tuple(Any, Callable)callback to process the chat promt, it takes the promt for input
app.py+4-2
chat.py+8-8