ankban commited on
Commit
ef132e5
·
verified ·
1 Parent(s): 1105178

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -4
app.py CHANGED
@@ -46,10 +46,30 @@ ankban@wharton.upenn.edu""")
46
  )
47
 
48
  # === Button Hooks ===
49
- btn_spoken.click(lambda: "spoken", outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode], fn=switch_mode)
50
- btn_written.click(lambda: "written", outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode], fn=switch_mode)
51
- btn_file_study.click(lambda: "study", outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode], fn=switch_mode)
52
- btn_file_view.click(lambda: "file", outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode], fn=switch_mode)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  return app
55
 
 
46
  )
47
 
48
  # === Button Hooks ===
49
+ btn_spoken.click(
50
+ fn=switch_mode,
51
+ inputs=[gr.State("spoken")],
52
+ outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode]
53
+ )
54
+
55
+ btn_written.click(
56
+ fn=switch_mode,
57
+ inputs=[gr.State("written")],
58
+ outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode]
59
+ )
60
+
61
+ btn_file_study.click(
62
+ fn=switch_mode,
63
+ inputs=[gr.State("study")],
64
+ outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode]
65
+ )
66
+
67
+ btn_file_view.click(
68
+ fn=switch_mode,
69
+ inputs=[gr.State("file")],
70
+ outputs=[spoken_panel, written_panel, study_panel, file_panel, current_mode]
71
+ )
72
+
73
 
74
  return app
75