TTsamurai commited on
Commit
483e73c
·
1 Parent(s): bc8bdfb

ask familiarity in an easy way

Browse files
Files changed (2) hide show
  1. _static/html/evaluation_instruction.html +2 -0
  2. app.py +12 -2
_static/html/evaluation_instruction.html CHANGED
@@ -10,6 +10,8 @@
10
  <ul>
11
  <li><strong>Likelihood of Purchase:</strong> Rate the likelihood of purchase.</li>
12
  <li><strong>Confidence in Your Decision:</strong> Rate the confidence in your decision.</li>
 
 
13
  </ul>
14
  </li>
15
  <li>After completing all the evaluation criteria, <strong>click the "Send: Evaluation" button</strong> to submit your responses. <strong>Once you submit, you cannot resubmit, so please review your answers carefully before submitting.</strong></li>
 
10
  <ul>
11
  <li><strong>Likelihood of Purchase:</strong> Rate the likelihood of purchase.</li>
12
  <li><strong>Confidence in Your Decision:</strong> Rate the confidence in your decision.</li>
13
+ <li><strong>Familiarity Level</strong>:</strong> Rate your familiarity with the stock before the interaction.</li>
14
+
15
  </ul>
16
  </li>
17
  <li>After completing all the evaluation criteria, <strong>click the "Send: Evaluation" button</strong> to submit your responses. <strong>Once you submit, you cannot resubmit, so please review your answers carefully before submitting.</strong></li>
app.py CHANGED
@@ -321,6 +321,11 @@ def create_demo():
321
  label="I am confident in my decision (1 = Strongly Disagree, 7 = Strongly Agree)",
322
  show_label=True,
323
  )
 
 
 
 
 
324
  with gr.Row():
325
  textbox = gr.HTML()
326
  evaluation_send_button = gr.Button(value="Send: Evaluation")
@@ -336,6 +341,7 @@ def create_demo():
336
  "reason": reason,
337
  "likelihood": likelihood,
338
  "confidence": confidence,
 
339
  "evaluation_send_button": evaluation_send_button,
340
  "general_instruction": general_instruction,
341
  "round_instruction": round_instruction,
@@ -458,6 +464,7 @@ def create_demo():
458
  reason,
459
  likelihood,
460
  confidence,
 
461
  evaluation_send_button,
462
  textbox,
463
  ) = (
@@ -472,6 +479,7 @@ def create_demo():
472
  tabs["reason"],
473
  tabs["likelihood"],
474
  tabs["confidence"],
 
475
  tabs["evaluation_send_button"],
476
  tabs["textbox"],
477
  )
@@ -545,7 +553,7 @@ def create_demo():
545
  [tab_session, chatbot],
546
  )
547
  evaluation_send_button.click(
548
- lambda user_id, comp, tab_session, dropdown, reason, likelihood, confidence, evaluation_send_button, textbox: respond_evaluation(
549
  user_id,
550
  tab_session,
551
  {
@@ -553,6 +561,7 @@ def create_demo():
553
  "reason": reason,
554
  "likelihood": likelihood,
555
  "confidence": confidence,
 
556
  },
557
  comp,
558
  evaluation_send_button,
@@ -566,10 +575,11 @@ def create_demo():
566
  reason,
567
  likelihood,
568
  confidence,
 
569
  evaluation_send_button,
570
  textbox,
571
  ],
572
- [tab_session, dropdown, reason, likelihood, confidence, evaluation_send_button, textbox],
573
  )
574
 
575
  def click_control_preference_stage(tabs, user_id, user_preference_elicitation_session):
 
321
  label="I am confident in my decision (1 = Strongly Disagree, 7 = Strongly Agree)",
322
  show_label=True,
323
  )
324
+ with gr.Row():
325
+ familiarity = stock_familiarity = gr.Radio(
326
+ [1, 2, 3, 4, 5, 6, 7],
327
+ label="What was your level of familiarity with the candidate stock before the interaction? (1 = Not Familiar, 7 = Very Familiar)",
328
+ )
329
  with gr.Row():
330
  textbox = gr.HTML()
331
  evaluation_send_button = gr.Button(value="Send: Evaluation")
 
341
  "reason": reason,
342
  "likelihood": likelihood,
343
  "confidence": confidence,
344
+ "familiarity": familiarity,
345
  "evaluation_send_button": evaluation_send_button,
346
  "general_instruction": general_instruction,
347
  "round_instruction": round_instruction,
 
464
  reason,
465
  likelihood,
466
  confidence,
467
+ familiarity,
468
  evaluation_send_button,
469
  textbox,
470
  ) = (
 
479
  tabs["reason"],
480
  tabs["likelihood"],
481
  tabs["confidence"],
482
+ tabs["familiarity"],
483
  tabs["evaluation_send_button"],
484
  tabs["textbox"],
485
  )
 
553
  [tab_session, chatbot],
554
  )
555
  evaluation_send_button.click(
556
+ lambda user_id, comp, tab_session, dropdown, reason, likelihood, confidence, familiarity, evaluation_send_button, textbox: respond_evaluation(
557
  user_id,
558
  tab_session,
559
  {
 
561
  "reason": reason,
562
  "likelihood": likelihood,
563
  "confidence": confidence,
564
+ "familiarity": familiarity,
565
  },
566
  comp,
567
  evaluation_send_button,
 
575
  reason,
576
  likelihood,
577
  confidence,
578
+ familiarity,
579
  evaluation_send_button,
580
  textbox,
581
  ],
582
+ [tab_session, dropdown, reason, likelihood, confidence, familiarity, evaluation_send_button, textbox],
583
  )
584
 
585
  def click_control_preference_stage(tabs, user_id, user_preference_elicitation_session):