Spaces:
Sleeping
Sleeping
File size: 1,946 Bytes
bb9b1e1 8ad917a bb9b1e1 850efe1 bb9b1e1 c105b09 850efe1 bb9b1e1 5b7b291 bb9b1e1 5b7b291 c105b09 850efe1 c105b09 3e4f779 c105b09 3e4f779 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
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() |