Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -114,12 +114,12 @@ def extract_code_and_test_case(generated_question):
|
|
114 |
|
115 |
return code_template, sample_test_case, expected_output
|
116 |
|
117 |
-
#
|
118 |
-
with st.form(key="input_form"):
|
|
|
119 |
company = st.text_input("Company", value="Google") # Default value: Google
|
120 |
difficulty = st.selectbox("Difficulty", ["Easy", "Medium", "Hard"], index=1) # Default: Medium
|
121 |
-
topic = st.text_input("Topic
|
122 |
-
|
123 |
generate_button = st.form_submit_button(label="Generate")
|
124 |
|
125 |
if generate_button:
|
@@ -196,14 +196,7 @@ if st.session_state.follow_up_mode:
|
|
196 |
|
197 |
st.session_state.messages.append({"role": "assistant", "content": assistant_response})
|
198 |
|
199 |
-
st.sidebar.markdown(""
|
200 |
-
## About
|
201 |
-
This is a Real-World Interview Question Generator powered by AI.
|
202 |
-
Enter a company name, topic, and level of difficulty, and it will transform a relevant question into a real-world interview scenario!
|
203 |
-
Continue chatting with the AI interviewer in the chatbox.
|
204 |
-
""")
|
205 |
-
|
206 |
-
# Sidebar content to display persistent generated question (left sidebar)
|
207 |
st.sidebar.markdown("## Generated Question")
|
208 |
if st.session_state.generated_question:
|
209 |
st.sidebar.markdown(st.session_state.generated_question)
|
|
|
114 |
|
115 |
return code_template, sample_test_case, expected_output
|
116 |
|
117 |
+
# Move the input form to the sidebar to make it always visible and more compact
|
118 |
+
with st.sidebar.form(key="input_form"):
|
119 |
+
st.markdown("## Generate a New Question")
|
120 |
company = st.text_input("Company", value="Google") # Default value: Google
|
121 |
difficulty = st.selectbox("Difficulty", ["Easy", "Medium", "Hard"], index=1) # Default: Medium
|
122 |
+
topic = st.text_input("Topic", value="Backtracking") # Default: Backtracking
|
|
|
123 |
generate_button = st.form_submit_button(label="Generate")
|
124 |
|
125 |
if generate_button:
|
|
|
196 |
|
197 |
st.session_state.messages.append({"role": "assistant", "content": assistant_response})
|
198 |
|
199 |
+
st.sidebar.markdown("---")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
st.sidebar.markdown("## Generated Question")
|
201 |
if st.session_state.generated_question:
|
202 |
st.sidebar.markdown(st.session_state.generated_question)
|