maahikachitagi commited on
Commit
a9cdc03
Β·
verified Β·
1 Parent(s): 888c9ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -38,6 +38,14 @@ questions = {
38
  def set_type(choice):
39
  user_profile["interview_type"] = choice.lower()
40
  return "Great! What’s your background and what field/role are you aiming for?"
 
 
 
 
 
 
 
 
41
 
42
  # Phase 2: Save background
43
  def save_background(info):
@@ -80,9 +88,10 @@ with gr.Blocks() as demo:
80
  btn2 = gr.Button("Technical")
81
  btn3 = gr.Button("College / Scholarship")
82
 
83
- btn1.click(set_type, inputs=[], outputs=type_out, _js="() => 'Behavioral'")
84
- btn2.click(set_type, inputs=[], outputs=type_out, _js="() => 'Technical'")
85
- btn3.click(set_type, inputs=[], outputs=type_out, _js="() => 'College'")
 
86
 
87
  gr.Markdown("## Step 2: Enter Background")
88
  background = gr.Textbox(label="Your background + field/goal")
 
38
  def set_type(choice):
39
  user_profile["interview_type"] = choice.lower()
40
  return "Great! What’s your background and what field/role are you aiming for?"
41
+ def set_type_behavioral():
42
+ return set_type("Behavioral")
43
+
44
+ def set_type_technical():
45
+ return set_type("Technical")
46
+
47
+ def set_type_college():
48
+ return set_type("College")
49
 
50
  # Phase 2: Save background
51
  def save_background(info):
 
88
  btn2 = gr.Button("Technical")
89
  btn3 = gr.Button("College / Scholarship")
90
 
91
+ btn1.click(set_type_behavioral, outputs=type_out)
92
+ btn2.click(set_type_technical, outputs=type_out)
93
+ btn3.click(set_type_college, outputs=type_out)
94
+
95
 
96
  gr.Markdown("## Step 2: Enter Background")
97
  background = gr.Textbox(label="Your background + field/goal")