Ridealist commited on
Commit
298e0dc
1 Parent(s): 12119c3

bugfix: shoten text for selectbox long text overlapping

Browse files
Files changed (1) hide show
  1. app.py +19 -11
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.write("1. Select a debate theme")
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.write("2. Select a topic")
329
- st.session_state.topic = st.selectbox("Choose your topic", topic_list)
 
 
 
 
 
 
 
330
 
331
- st.write("3. Write 3 cases (Note that these are just a tool to help you structure your thoughts on the content and does not reflect the actual discussion.)")
 
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.write("4. Choose your Side (Pros and Cons)")
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 = "Con"
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