ppsingh commited on
Commit
79bc4e9
1 Parent(s): 9ce164b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -111,6 +111,15 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
111
  sources_textbox = gr.HTML(show_label=False, elem_id="sources-textbox")
112
  docs_textbox = gr.State("")
113
  gr.Markdown("Reminder: To get better results select the specific report/reports")
 
 
 
 
 
 
 
 
 
114
 
115
 
116
  # static tab 'about us'
 
111
  sources_textbox = gr.HTML(show_label=False, elem_id="sources-textbox")
112
  docs_textbox = gr.State("")
113
  gr.Markdown("Reminder: To get better results select the specific report/reports")
114
+
115
+ def change_sample_questions(key):
116
+ # update the questions list based on key selected
117
+ index = list(QUESTIONS.keys()).index(key)
118
+ visible_bools = [False] * len(samples)
119
+ visible_bools[index] = True
120
+ return [gr.update(visible=visible_bools[i]) for i in range(len(samples))]
121
+
122
+ dropdown_samples.change(change_sample_questions,dropdown_samples,samples)
123
 
124
 
125
  # static tab 'about us'