File size: 1,436 Bytes
bb9b1e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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()