File size: 1,531 Bytes
51fe9d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st
from transformers import pipeline

st.set_page_config(page_title="2023 FS Hackathon")
st.title("Founder's Studio AI Sandbox 🕹️")
expander = st.expander("Click here to close this intro", expanded=True)
expander.write(
    """
    This web app allows you to perform common Natural Language Processing tasks, select a task below to get started.
    These tasks are intended to help you validate your intuition and build a proof of concept for your idea.

    If a task you deem useful is not listed here, feel free to get in touch with Founder's Studio team at [email protected]. 
    Happy hackathon!
    """
)

st.subheader(":point_down: Use the following drop-down menu to select a task!")

OPTION1="Chat wiht a file"
OPTION2="Text summarization"
OPTION_N="OTHER"

option = st.selectbox("Please select a task 🤖", 
                      options=[OPTION1, OPTION2, OPTION_N],
                      )

if option == "OTHER":
    user_suggestion = st.text_input("Please specify the task you would like to perform", value="")
    if user_suggestion:
        
        st.write("Thanks for your suggestion, we will get back to you soon!")
        st.stop()

if option == OPTION1:
    from qa import qa_main 
    with st.container(): 
        qa_main()

elif option == OPTION2:
    from summarization import summarization_main
    with st.container():
        summarization_main()

elif option==OPTION_N:
    raise NotImplementedError("This option is not yet implemented, please select another one")