sharmavaruncs commited on
Commit
42bb9c4
·
1 Parent(s): e35ca6f

added buttons side by side

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -433,9 +433,12 @@ def process_file(ser_model,tokenizer,gpt_model,gpt_tokenizer):
433
  txt = f"You seem to be <b>{(emo2promptMapping[emo]).capitalize()}!</b>\n Click on 'Show Helpful Tips' button to proceed further."
434
  st.markdown(f"<div class='mobile-screen' style='font-size: 24px;'>{txt} </div>", unsafe_allow_html=True)
435
 
 
 
 
436
  # Store the value of emo in the session state
437
  st.session_state.emo = emo
438
- if st.button(button_label1):
439
  #with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating tips (it may take upto 2-3 mins). Please wait...</p>", unsafe_allow_html=True)):
440
  with st.spinner("Generating transcriptions in the side pane! Please wait..."):
441
  # Retrieve prompt from the emotion
@@ -447,7 +450,7 @@ def process_file(ser_model,tokenizer,gpt_model,gpt_tokenizer):
447
  GenerateText(emo,gpt_tokenizer,gpt_model,temp,top_k,top_p)
448
 
449
 
450
- if st.button(button_label2):
451
  with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating tips (it may take upto 2-3 mins). Please wait...</p>", unsafe_allow_html=True)):
452
  # Retrieve prompt from the emotion
453
  emo = st.session_state.emo
 
433
  txt = f"You seem to be <b>{(emo2promptMapping[emo]).capitalize()}!</b>\n Click on 'Show Helpful Tips' button to proceed further."
434
  st.markdown(f"<div class='mobile-screen' style='font-size: 24px;'>{txt} </div>", unsafe_allow_html=True)
435
 
436
+ # Create two columns for the buttons
437
+ col1, col2 = st.beta_columns(2)
438
+
439
  # Store the value of emo in the session state
440
  st.session_state.emo = emo
441
+ if col1.button(button_label1):
442
  #with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating tips (it may take upto 2-3 mins). Please wait...</p>", unsafe_allow_html=True)):
443
  with st.spinner("Generating transcriptions in the side pane! Please wait..."):
444
  # Retrieve prompt from the emotion
 
450
  GenerateText(emo,gpt_tokenizer,gpt_model,temp,top_k,top_p)
451
 
452
 
453
+ if col2.button(button_label2):
454
  with st.spinner(st.markdown("<p style='font-size: 16px; font-weight: bold;'>Generating tips (it may take upto 2-3 mins). Please wait...</p>", unsafe_allow_html=True)):
455
  # Retrieve prompt from the emotion
456
  emo = st.session_state.emo