NikilDGr8 commited on
Commit
582cdaa
·
verified ·
1 Parent(s): 2f54393

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -22,7 +22,7 @@ questions = [
22
  "What is the chief complaint regarding the patient's oral health?",
23
  "List the Medical history mentioned",
24
  "Give the Dental history in detail",
25
- "What are the mentioned clinical findings?" # Updated question for Clinical Findings
26
  ]
27
 
28
  # List of form fields in the correct order
@@ -49,7 +49,7 @@ oral_health_assessment_form = [
49
  "Chief complaint",
50
  "Medical history",
51
  "Dental history",
52
- "Clinical Findings", # Added Clinical Findings
53
  "Treatment plan",
54
  "Referred to",
55
  "Calculus",
@@ -232,9 +232,8 @@ with gr.Blocks() as demo:
232
  dropdown_Calculus = gr.Dropdown(choices=["+", "++", "+++"], label="Calculus", interactive=True)
233
  dropdown_stains = gr.Dropdown(choices=["+", "++", "+++"], label="Stains", interactive=True)
234
  dropdown_treatment_plan = gr.Dropdown(choices=["Scaling", "Filling", "Pulp therapy", "Extraction", "Medication"], label="Treatment plan", interactive=True)
235
- # Added Clinical Findings textbox with prompt
236
  clinical_findings_input = gr.Textbox(label="Clinical Findings", value="What are the mentioned clinical findings", interactive=True)
237
-
238
  def enable_transcribe_button(audio_path: str):
239
  return gr.update(interactive=True)
240
 
@@ -254,18 +253,18 @@ with gr.Blocks() as demo:
254
  transcribe_button.click(
255
  fn=update_textboxes,
256
  inputs=[audio_input, doctor_name_input, location_input],
257
- outputs=[doctor_name_display, location_display, patient_name_input] + textboxes_left + textboxes_right + [dropdown_referred, dropdown_treatment_plan, dropdown_Calculus, dropdown_stains, clinical_findings_input] # Added Clinical Findings
258
  )
259
 
260
  save_button = gr.Button("Save Form")
261
  save_output = gr.HTML(label="Save Output")
262
 
263
- def handle_submission(doctor_name: str, location: str, patient_name: str, age: str, gender: str, chief_complaint: str, medical_history: str, dental_history: str, clinical_findings: str, treatment_plan: str, referred_to: str, Calculus: str, stains: str) -> str:
264
- return save_answers(doctor_name, location, patient_name, age, gender, chief_complaint, medical_history, dental_history, clinical_findings, treatment_plan, referred_to, Calculus, stains)
265
 
266
  save_button.click(
267
  fn=handle_submission,
268
- inputs=[doctor_name_display, location_display, patient_name_input] + textboxes_left + textboxes_right + [dropdown_referred, dropdown_treatment_plan, dropdown_Calculus, dropdown_stains, clinical_findings_input],
269
  outputs=save_output
270
  )
271
 
 
22
  "What is the chief complaint regarding the patient's oral health?",
23
  "List the Medical history mentioned",
24
  "Give the Dental history in detail",
25
+ "Please give all the clinical findings which were listed"
26
  ]
27
 
28
  # List of form fields in the correct order
 
49
  "Chief complaint",
50
  "Medical history",
51
  "Dental history",
52
+ "Clinical Findings",
53
  "Treatment plan",
54
  "Referred to",
55
  "Calculus",
 
232
  dropdown_Calculus = gr.Dropdown(choices=["+", "++", "+++"], label="Calculus", interactive=True)
233
  dropdown_stains = gr.Dropdown(choices=["+", "++", "+++"], label="Stains", interactive=True)
234
  dropdown_treatment_plan = gr.Dropdown(choices=["Scaling", "Filling", "Pulp therapy", "Extraction", "Medication"], label="Treatment plan", interactive=True)
 
235
  clinical_findings_input = gr.Textbox(label="Clinical Findings", value="What are the mentioned clinical findings", interactive=True)
236
+
237
  def enable_transcribe_button(audio_path: str):
238
  return gr.update(interactive=True)
239
 
 
253
  transcribe_button.click(
254
  fn=update_textboxes,
255
  inputs=[audio_input, doctor_name_input, location_input],
256
+ outputs=[doctor_name_display, location_display, patient_name_input] + textboxes_left + textboxes_right + [dropdown_referred, dropdown_treatment_plan, dropdown_Calculus, dropdown_stains]
257
  )
258
 
259
  save_button = gr.Button("Save Form")
260
  save_output = gr.HTML(label="Save Output")
261
 
262
+ def handle_submission(doctor_name: str, location: str, patient_name: str, age: str, gender: str, chief_complaint: str, medical_history: str, dental_history: str, clinical_findings: str, treatment_plan: str, referred_to: str, Calculus: str, stains: str):
263
+ return save_answers(doctor_name, location, patient_name, age, gender, chief_complaint, medical_history, dental_history, clinical_findings, treatment_plan, referred_to,Calculus, stains)
264
 
265
  save_button.click(
266
  fn=handle_submission,
267
+ inputs=[doctor_name_display, location_display, patient_name_input] + textboxes_left + textboxes_right + [dropdown_referred, dropdown_treatment_plan, dropdown_Calculus, dropdown_stains],
268
  outputs=save_output
269
  )
270