fracapuano commited on
Commit
d391cb2
1 Parent(s): fd563a8

fix: minor restructuring

Browse files
Files changed (1) hide show
  1. app.py +27 -15
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import streamlit as st
2
- from transformers import pipeline
3
 
4
  st.set_page_config(page_title="2023 FS Hackathon")
5
  st.title("Founder's Studio AI Sandbox 🕹️")
@@ -16,21 +15,15 @@ expander.write(
16
 
17
  st.subheader(":point_down: Use the following drop-down menu to select a task!")
18
 
19
- OPTION1="Chat wiht a file"
20
- OPTION2="Text summarization"
21
- OPTION_N="OTHER"
22
 
23
- option = st.selectbox("Please select a task 🤖",
24
- options=[OPTION1, OPTION2, OPTION_N],
 
25
  )
26
 
27
- if option == "OTHER":
28
- user_suggestion = st.text_input("Please specify the task you would like to perform", value="")
29
- if user_suggestion:
30
-
31
- st.write("Thanks for your suggestion, we will get back to you soon!")
32
- st.stop()
33
-
34
  if option == OPTION1:
35
  from qa import qa_main
36
  with st.container():
@@ -41,5 +34,24 @@ elif option == OPTION2:
41
  with st.container():
42
  summarization_main()
43
 
44
- elif option==OPTION_N:
45
- raise NotImplementedError("This option is not yet implemented, please select another one")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
 
2
 
3
  st.set_page_config(page_title="2023 FS Hackathon")
4
  st.title("Founder's Studio AI Sandbox 🕹️")
 
15
 
16
  st.subheader(":point_down: Use the following drop-down menu to select a task!")
17
 
18
+ OPTION1="Chat with a file 💬📖"
19
+ OPTION2="Text summarization 🔎"
20
+ OPTION_N="Other 🤔"
21
 
22
+ option = st.radio(
23
+ "Please select a task 🤖",
24
+ options=[OPTION1, OPTION2, OPTION_N],
25
  )
26
 
 
 
 
 
 
 
 
27
  if option == OPTION1:
28
  from qa import qa_main
29
  with st.container():
 
34
  with st.container():
35
  summarization_main()
36
 
37
+ elif option == OPTION_N:
38
+ from mailing import mailing_main
39
+ with st.container():
40
+ user_suggestion = st.text_input(
41
+ "What other task would you like to perform?",
42
+ placeholder="Transform meeting transcripts into rainbow-colored unicorns"
43
+ )
44
+ if user_suggestion:
45
+ st.write("""
46
+ Thanks for contributing with your suggestion! We are carefully reviewing every suggestion.
47
+ If you wish to further discuss your task suggestion, consider reaching out to [email protected].
48
+ We will get back to you as soon as possible!
49
+ """)
50
+
51
+ mailing_main(
52
+ subject="**NEW TASK SUGGESTION** - Automatic email.",
53
+ body=f"User suggestion\n: {user_suggestion}",
54
+ to_address="[email protected]"
55
+ )
56
+ st.stop()
57
+