VyLala commited on
Commit
bd93d29
·
verified ·
1 Parent(s): 7618057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -303,12 +303,6 @@ with gr.Blocks() as interface:
303
  # gr.Markdown("Extremely likely")
304
 
305
  # nps_submit = gr.Button("Submit", elem_id="nps-submit-button")
306
- css = """
307
- #nps-labels-row {
308
- display: flex;
309
- justify-content: space-between;
310
- }
311
- """
312
  with gr.Group(elem_id="nps-container"):
313
  gr.Markdown("### How likely are you to recommend this tool to a colleague or peer?")
314
 
@@ -317,13 +311,19 @@ with gr.Blocks() as interface:
317
  label="Select score:",
318
  interactive=True,
319
  container=False,
320
- elem_id="nps-radio-container" # Assigning elem_id for better styling if needed
321
  )
322
 
323
- # Use the elem_id that the CSS is targeting
324
- with gr.Row(elem_id="nps-labels-row"):
325
- gr.Markdown("Not likely")
326
- gr.Markdown("Extremely likely")
 
 
 
 
 
 
327
 
328
  nps_submit = gr.Button("Submit", elem_id="nps-submit-button")
329
  nps_output = gr.Textbox(label="", interactive=False, visible=True)
 
303
  # gr.Markdown("Extremely likely")
304
 
305
  # nps_submit = gr.Button("Submit", elem_id="nps-submit-button")
 
 
 
 
 
 
306
  with gr.Group(elem_id="nps-container"):
307
  gr.Markdown("### How likely are you to recommend this tool to a colleague or peer?")
308
 
 
311
  label="Select score:",
312
  interactive=True,
313
  container=False,
314
+ elem_id="nps-radio-container"
315
  )
316
 
317
+ # This Row contains three elements to force the alignment
318
+ with gr.Row():
319
+ # 1. Left Label
320
+ gr.Markdown("Not likely", scale=1)
321
+
322
+ # 2. Invisible spacer that expands
323
+ gr.Markdown("", scale=8)
324
+
325
+ # 3. Right Label, aligned to the right
326
+ gr.Markdown("Extremely likely", scale=1, text_align="right")
327
 
328
  nps_submit = gr.Button("Submit", elem_id="nps-submit-button")
329
  nps_output = gr.Textbox(label="", interactive=False, visible=True)