Update app.py
Browse files
app.py
CHANGED
@@ -17,28 +17,86 @@ st.session_state["openai_model"] = "gpt-4o"
|
|
17 |
def complete_setup():
|
18 |
st.session_state.setup_complete = True
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
# Setup stage for collecting user details
|
21 |
if not st.session_state.setup_complete:
|
22 |
st.subheader('Personal Information')
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
# Get personal information input
|
25 |
-
st.session_state["name"] = st.text_input(label="Name", value="",
|
|
|
|
|
|
|
26 |
|
27 |
# Company and Position Section
|
28 |
st.subheader('Company and Position')
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
st.session_state["company"] = st.selectbox(
|
37 |
"Select a Company",
|
38 |
("Amazon", "Meta", "Udemy", "365 Company", "Nestle", "LinkedIn", "Spotify"),
|
39 |
-
index=("Amazon", "Meta", "Udemy", "365 Company", "Nestle", "LinkedIn", "Spotify").index("
|
40 |
)
|
41 |
|
|
|
|
|
42 |
# Button to complete setup
|
43 |
if st.button("Start Interview", on_click=complete_setup):
|
44 |
st.write("Setup complete. Starting interview...")
|
|
|
17 |
def complete_setup():
|
18 |
st.session_state.setup_complete = True
|
19 |
|
20 |
+
# # Setup stage for collecting user details
|
21 |
+
# if not st.session_state.setup_complete:
|
22 |
+
# st.subheader('Personal Information')
|
23 |
+
|
24 |
+
# # Get personal information input
|
25 |
+
# st.session_state["name"] = st.text_input(label="Name", value="", placeholder="Enter your name", max_chars=40)
|
26 |
+
|
27 |
+
# # Company and Position Section
|
28 |
+
# st.subheader('Company and Position')
|
29 |
+
|
30 |
+
# st.session_state["position"] = st.selectbox(
|
31 |
+
# "Choose a position",
|
32 |
+
# ("Data Scientist", "Data Engineer", "ML Engineer", "BI Analyst", "Financial Analyst"),
|
33 |
+
# index=("Data Scientist", "Data Engineer", "ML Engineer", "BI Analyst", "Financial Analyst").index("Data Scientist")
|
34 |
+
# )
|
35 |
+
|
36 |
+
# st.session_state["company"] = st.selectbox(
|
37 |
+
# "Select a Company",
|
38 |
+
# ("Amazon", "Meta", "Udemy", "365 Company", "Nestle", "LinkedIn", "Spotify"),
|
39 |
+
# index=("Amazon", "Meta", "Udemy", "365 Company", "Nestle", "LinkedIn", "Spotify").index("Amazon")
|
40 |
+
# )
|
41 |
+
|
42 |
+
# # Button to complete setup
|
43 |
+
# if st.button("Start Interview", on_click=complete_setup):
|
44 |
+
# st.write("Setup complete. Starting interview...")
|
45 |
+
|
46 |
# Setup stage for collecting user details
|
47 |
if not st.session_state.setup_complete:
|
48 |
st.subheader('Personal Information')
|
49 |
+
|
50 |
+
# Initialize session state for personal information
|
51 |
+
if "name" not in st.session_state:
|
52 |
+
st.session_state["name"] = ""
|
53 |
+
if "experience" not in st.session_state:
|
54 |
+
st.session_state["experience"] = ""
|
55 |
+
if "skills" not in st.session_state:
|
56 |
+
st.session_state["skills"] = ""
|
57 |
+
|
58 |
+
|
59 |
# Get personal information input
|
60 |
+
st.session_state["name"] = st.text_input(label="Name", value=st.session_state["name"], placeholder="Enter your name", max_chars=40)
|
61 |
+
st.session_state["experience"] = st.text_area(label="Experience", value=st.session_state["experience"], placeholder="Describe your experience", max_chars=200)
|
62 |
+
st.session_state["skills"] = st.text_area(label="Skills", value=st.session_state["skills"], placeholder="List your skills", max_chars=200)
|
63 |
+
|
64 |
|
65 |
# Company and Position Section
|
66 |
st.subheader('Company and Position')
|
67 |
|
68 |
+
# Initialize session state for company and position information and setting default values
|
69 |
+
if "level" not in st.session_state:
|
70 |
+
st.session_state["level"] = "Junior"
|
71 |
+
if "position" not in st.session_state:
|
72 |
+
st.session_state["position"] = "Data Scientist"
|
73 |
+
if "company" not in st.session_state:
|
74 |
+
st.session_state["company"] = "Amazon"
|
75 |
+
|
76 |
+
col1, col2 = st.columns(2)
|
77 |
+
with col1:
|
78 |
+
st.session_state["level"] = st.radio(
|
79 |
+
"Choose level",
|
80 |
+
key="visibility",
|
81 |
+
options=["Junior", "Mid-level", "Senior"],
|
82 |
+
index=["Junior", "Mid-level", "Senior"].index(st.session_state["level"])
|
83 |
+
)
|
84 |
+
|
85 |
+
with col2:
|
86 |
+
st.session_state["position"] = st.selectbox(
|
87 |
+
"Choose a position",
|
88 |
+
("Data Scientist", "Data Engineer", "ML Engineer", "BI Analyst", "Financial Analyst"),
|
89 |
+
index=("Data Scientist", "Data Engineer", "ML Engineer", "BI Analyst", "Financial Analyst").index(st.session_state["position"])
|
90 |
+
)
|
91 |
|
92 |
st.session_state["company"] = st.selectbox(
|
93 |
"Select a Company",
|
94 |
("Amazon", "Meta", "Udemy", "365 Company", "Nestle", "LinkedIn", "Spotify"),
|
95 |
+
index=("Amazon", "Meta", "Udemy", "365 Company", "Nestle", "LinkedIn", "Spotify").index(st.session_state["company"])
|
96 |
)
|
97 |
|
98 |
+
|
99 |
+
|
100 |
# Button to complete setup
|
101 |
if st.button("Start Interview", on_click=complete_setup):
|
102 |
st.write("Setup complete. Starting interview...")
|