Spaces:
Sleeping
Sleeping
| 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: click on the top-right corner of an image to enlarge it!*") | |
| # Set the columns | |
| # 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 | |
| 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() |