Spaces:
Sleeping
Sleeping
import streamlit as st | |
import time | |
def main(): | |
llm_models = [ | |
"db_resnet50", | |
"db_resnet34", | |
"db_mobilenet_v3_large", | |
"linknet_resnet18", | |
"linknet_resnet34", | |
"linknet_resnet50", | |
] | |
"""Build a streamlit layout""" | |
# Wide mode | |
st.set_page_config(layout="wide") | |
# 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 | |
# Sidebar | |
# File selection | |
st.sidebar.title("Model selection") | |
# 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"): | |
time.sleep(5) | |
with st.spinner("Loading model..."): | |
predictor = load_predictor( | |
det_arch, reco_arch, assume_straight_pages, straighten_pages, bin_thresh, forward_device | |
) | |
st.markdown("# LLM Notebook") | |
text = st.text_area('Prompt:', prompt, placeholder='Please, type your question and submit. ') | |
submitted = st.form_submit_button('Submit') | |
if submitted: | |
time.sleep(4) | |
with st.spinner("Analyzing..."): | |
st.sidebar.markdown(f" * you are here") | |
if __name__ == "__main__": | |
main() |