NikilDGr8 commited on
Commit
20edab9
1 Parent(s): 507f878

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -39,6 +39,7 @@ oral_health_assessment_form = [
39
  "Clinical Findings",
40
  "Any other finding",
41
  "Treatment plan",
 
42
  ]
43
 
44
  # Function to generate answers for the questions
@@ -100,7 +101,7 @@ def main(audio):
100
  answers.insert(0, "") # for "Child's Name"
101
  answers.insert(0, "Dr.Alvi") # for "Doctor’s Name"
102
 
103
- return answers
104
 
105
  def save_answers(*args):
106
  current_datetime = datetime.now().isoformat()
@@ -167,11 +168,21 @@ with gr.Blocks() as demo:
167
  with gr.Column():
168
  textboxes_right = [gr.Textbox(label=oral_health_assessment_form[i], value="", interactive=True) for i in range(len(oral_health_assessment_form)//2, len(oral_health_assessment_form))]
169
 
 
 
 
 
 
 
 
 
 
 
170
  submit_button = gr.Button("Submit", elem_id="submit_button")
171
  output_html = gr.HTML(label="Submitted Answers")
172
 
173
- transcribe_button.click(fn=main, inputs=audio_input, outputs=textboxes_left + textboxes_right)
174
- submit_button.click(fn=save_answers, inputs=textboxes_left + textboxes_right, outputs=output_html)
175
 
176
  download_button = gr.Button("Download Table as CSV")
177
  download_csv_output = gr.File(label="Download CSV")
 
39
  "Clinical Findings",
40
  "Any other finding",
41
  "Treatment plan",
42
+ "Referred to"
43
  ]
44
 
45
  # Function to generate answers for the questions
 
101
  answers.insert(0, "") # for "Child's Name"
102
  answers.insert(0, "Dr.Alvi") # for "Doctor’s Name"
103
 
104
+ return answers + [""] # Add empty string for "Referred to"
105
 
106
  def save_answers(*args):
107
  current_datetime = datetime.now().isoformat()
 
168
  with gr.Column():
169
  textboxes_right = [gr.Textbox(label=oral_health_assessment_form[i], value="", interactive=True) for i in range(len(oral_health_assessment_form)//2, len(oral_health_assessment_form))]
170
 
171
+ referred_to = gr.Dropdown(label="Referred to", choices=[
172
+ "ORAL MEDICINE & RADIOLOGY",
173
+ "PERIODONTICS",
174
+ "ORAL SURGERY",
175
+ "CONSERVATIVE AND ENDODONTICS",
176
+ "PROSTHODONTICS",
177
+ "PEDODONTICS",
178
+ "ORTHODONTICS"
179
+ ], value="", interactive=True)
180
+
181
  submit_button = gr.Button("Submit", elem_id="submit_button")
182
  output_html = gr.HTML(label="Submitted Answers")
183
 
184
+ transcribe_button.click(fn=main, inputs=audio_input, outputs=textboxes_left + textboxes_right + [referred_to])
185
+ submit_button.click(fn=save_answers, inputs=textboxes_left + textboxes_right + [referred_to], outputs=output_html)
186
 
187
  download_button = gr.Button("Download Table as CSV")
188
  download_csv_output = gr.File(label="Download CSV")