Spaces:
Runtime error
Runtime error
bugfix: shoten text for selectbox long text overlapping
Browse files
app.py
CHANGED
@@ -260,11 +260,11 @@ def page4():
|
|
260 |
#########################################################
|
261 |
# Tab 1 - Total Debate (토론 준비 -> 연습 -> 평가)
|
262 |
#########################################################
|
|
|
263 |
st.header("Total Debate")
|
264 |
debate_themes = ['Education','Sports','Religion','Justice','Pandemic','Politics','Minority','etc']
|
265 |
|
266 |
-
st.
|
267 |
-
|
268 |
st.session_state.debate_theme = st.selectbox("Choose your debate theme", debate_themes)
|
269 |
|
270 |
if st.session_state.debate_theme == 'Education':
|
@@ -325,33 +325,41 @@ def page4():
|
|
325 |
"Assuming feasibility, THW choose to continuously relive the happiest moment of one’s life."
|
326 |
]
|
327 |
|
328 |
-
st.
|
329 |
-
st.session_state.topic = st.selectbox(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
-
st.
|
|
|
332 |
|
333 |
#########################################################
|
334 |
# Case도 세션에 저장
|
335 |
#########################################################
|
336 |
st.session_state.case1 = st.text_area(
|
337 |
-
label="Case 1",
|
338 |
placeholder="Each case should be consisted of opinion, reasoning, and example.",
|
339 |
height=100
|
340 |
)
|
341 |
st.session_state.case2 = st.text_area(
|
342 |
-
label="Case 2",
|
343 |
placeholder="Each case should be consisted of opinion, reasoning, and example.",
|
344 |
height=100
|
345 |
)
|
346 |
st.session_state.case3 = st.text_area(
|
347 |
-
label="Case 3",
|
348 |
placeholder="Each case should be consisted of opinion, reasoning, and example.",
|
349 |
height=100
|
350 |
)
|
351 |
case_error_message = st.empty()
|
352 |
|
353 |
-
st.
|
354 |
-
st.session_state.pros_and_cons = st.selectbox("Choose your Side", ["Pros", "Cons"])
|
355 |
|
356 |
# Save the data to database
|
357 |
start = st.button(
|
@@ -491,7 +499,7 @@ def page5():
|
|
491 |
|
492 |
# bot role, pros and cons
|
493 |
if st.session_state['pros_and_cons'] == "Pros":
|
494 |
-
bot_role = "
|
495 |
else:
|
496 |
bot_role = "Pros"
|
497 |
|
|
|
260 |
#########################################################
|
261 |
# Tab 1 - Total Debate (토론 준비 -> 연습 -> 평가)
|
262 |
#########################################################
|
263 |
+
|
264 |
st.header("Total Debate")
|
265 |
debate_themes = ['Education','Sports','Religion','Justice','Pandemic','Politics','Minority','etc']
|
266 |
|
267 |
+
st.subheader("1. Theme")
|
|
|
268 |
st.session_state.debate_theme = st.selectbox("Choose your debate theme", debate_themes)
|
269 |
|
270 |
if st.session_state.debate_theme == 'Education':
|
|
|
325 |
"Assuming feasibility, THW choose to continuously relive the happiest moment of one’s life."
|
326 |
]
|
327 |
|
328 |
+
st.subheader("2. Topic")
|
329 |
+
topic = st.session_state.topic = st.selectbox(
|
330 |
+
label="Choose your topic",
|
331 |
+
options=topic_list,
|
332 |
+
format_func=lambda x: x[:45] + "...",
|
333 |
+
# help="This is help message",
|
334 |
+
# on_change=
|
335 |
+
)
|
336 |
+
st.write("> Topic : ", topic)
|
337 |
|
338 |
+
st.subheader("3. Cases")
|
339 |
+
st.caption('These are just a tool to help you structure your thoughts on the content and does not reflect the actual discussion.')
|
340 |
|
341 |
#########################################################
|
342 |
# Case도 세션에 저장
|
343 |
#########################################################
|
344 |
st.session_state.case1 = st.text_area(
|
345 |
+
label="Write a Case 1",
|
346 |
placeholder="Each case should be consisted of opinion, reasoning, and example.",
|
347 |
height=100
|
348 |
)
|
349 |
st.session_state.case2 = st.text_area(
|
350 |
+
label="Write a Case 2",
|
351 |
placeholder="Each case should be consisted of opinion, reasoning, and example.",
|
352 |
height=100
|
353 |
)
|
354 |
st.session_state.case3 = st.text_area(
|
355 |
+
label="Write a Case 3",
|
356 |
placeholder="Each case should be consisted of opinion, reasoning, and example.",
|
357 |
height=100
|
358 |
)
|
359 |
case_error_message = st.empty()
|
360 |
|
361 |
+
st.subheader("4. Side")
|
362 |
+
st.session_state.pros_and_cons = st.selectbox("Choose your Side (Pros and Cons)", ["Pros", "Cons"])
|
363 |
|
364 |
# Save the data to database
|
365 |
start = st.button(
|
|
|
499 |
|
500 |
# bot role, pros and cons
|
501 |
if st.session_state['pros_and_cons'] == "Pros":
|
502 |
+
bot_role = "Cons"
|
503 |
else:
|
504 |
bot_role = "Pros"
|
505 |
|