import streamlit as st import time def main(): """Build a streamlit layout""" # Wide mode st.set_page_config(layout="wide") llm_models = [ "db_resnet50", "db_resnet34", "db_mobilenet_v3_large", "linknet_resnet18", "linknet_resnet34", "linknet_resnet50", ] # Designing the interface st.title("Financial LLM test") # For newline st.write("\n") # Instructions st.markdown("*Hint: you can select the LLM model and write your prompt") # Set the columns col1, col2 = st.columns(2) col1.subheader("Prompt Section") col2.subheader("Model Output") # Model selection st.sidebar.title("Model selection") det_arch = st.sidebar.selectbox("LLM model", llm_models) # For newline st.sidebar.write("\n") if st.sidebar.button("Select LLM"): with st.spinner("Loading model..."): time.sleep(5) # load the model TODO text_input = '' with col1: text_input_temp = st.text_input( "Please, type your question and submit.", "Write Your Prompt", key="placeholder", ) if st.button("Submit"): text_input = text_input_temp with col2: if text_input != '': with st.spinner("Analyzing..."): time.sleep(4) st.write("You entered: ", text_input) text_input = '' # st.markdown("# LLM Notebook") # with st.form('my_form'): # text = st.text_area('Prompt:', placeholder='Please, type your question and submit. ') # print("tetx", text) # submitted = st.form_submit_button('Submit') # if submitted: # with st.spinner("Analyzing..."): # time.sleep(4) # st.text("You predd submit") if __name__ == "__main__": main()