majweldon commited on
Commit
5063082
·
verified ·
1 Parent(s): 048e9b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -28,18 +28,17 @@ def transcribe(audio, history_type):
28
  print(f"Received audio file path: {audio}")
29
 
30
  history_type_map = {
31
- "Impression/Plan": "Weldon_Impression_Note_Format.txt",
32
- "Handover": "Weldon_Handover_Note_Format.txt",
33
- "Meds Only": "Medications.txt",
34
- "Triage": "Triage_Note_Format.txt",
35
- "Full Visit": "Weldon_Full_Visit_Format.txt",
36
- "Psych": "Weldon_Psych_Format.txt",
37
- "Feedback": "Weldon_Feedback_Format.txt",
38
- "Hallway Consult": "Weldon_Hallway_Consult_Format.txt",
39
- "Dx/DDx": "Weldon_Dx_DDx_Format.txt"
40
  }
41
 
42
- file_name = history_type_map.get(history_type, "Weldon_Full_Visit_Format.txt")
43
  with open(f"Format_Library/{file_name}", "r") as f:
44
  role = f.read()
45
  messages = [{"role": "system", "content": role}]
@@ -132,7 +131,7 @@ my_inputs = [
132
  #gr.Audio(sources=["microphone"], type="filepath",format="wav"), #Gradio 4.x
133
  #gr.Audio(sources=["microphone"],type="numpy",editable="false"), #Gradio 4.x
134
  gr.Microphone(type="filepath",format="wav"), #Gradio 4.x
135
- gr.Radio(["Full Visit","Impression/Plan","Psych","Handover","Hallway Consult","Dx/DDx","Feedback","Meds Only"], show_label=False),
136
  ]
137
 
138
  ui = gr.Interface(fn=transcribe,
 
28
  print(f"Received audio file path: {audio}")
29
 
30
  history_type_map = {
31
+ "History Simple": "McIntyre_Short_History.txt",
32
+ "History Complex": "McIntyre_Long_History.txt",
33
+ "Full Visit": "McIntyre_Full_Visit.txt",
34
+ "Impression/Plan": "McIntyre_Impression.txt",
35
+ "EMS": "McIntyre_EMS_Handover.txt",
36
+ "Dx/DDx": "McIntyre_Dx_DDx_Format.txt",
37
+ "Feedback": "McIntyre_Feedback.txt",
38
+ "Hallway Consult": "McIntyre_Hallway_Consult_Format.txt"
 
39
  }
40
 
41
+ file_name = history_type_map.get(history_type, "McIntyre_Full_Visit.txt")
42
  with open(f"Format_Library/{file_name}", "r") as f:
43
  role = f.read()
44
  messages = [{"role": "system", "content": role}]
 
131
  #gr.Audio(sources=["microphone"], type="filepath",format="wav"), #Gradio 4.x
132
  #gr.Audio(sources=["microphone"],type="numpy",editable="false"), #Gradio 4.x
133
  gr.Microphone(type="filepath",format="wav"), #Gradio 4.x
134
+ gr.Radio(["History Simple","History Complex","Full Visit","Impression/Plan","EMS","Dx/DDx","Feedback","Hallway Consult"], show_label=False),
135
  ]
136
 
137
  ui = gr.Interface(fn=transcribe,