majweldon commited on
Commit
ba9f15f
·
1 Parent(s): 867e38a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -23,14 +23,13 @@ def transcribe(audio, history_type):
23
  "Impression/Plan": "Weldon_Impression_Note_Format.txt",
24
  "Handover": "Weldon_Handover_Note_Format.txt",
25
  "Meds Only": "Medications.txt",
26
- "EMS": "EMS_Handover_Note_Format.txt",
27
  "Triage": "Triage_Note_Format.txt",
28
  "Full Visit": "Weldon_Full_Visit_Format.txt",
29
  "Psych": "Weldon_Psych_Format.txt",
30
- "SBAR": "SBAR.txt"
31
  }
32
 
33
- file_name = history_type_map.get(history_type, "Weldon_Full_Visit_Format.txt")
34
  with open(f"Format_Library/{file_name}", "r") as f:
35
  role = f.read()
36
 
@@ -105,9 +104,9 @@ def transcribe(audio, history_type):
105
 
106
  #Define Gradio Interface
107
  my_inputs = [
108
- gr.Audio(source="microphone", type="filepath"), #Gradio 3.48.0
109
- #gr.Audio(sources=["microphone"],type="numpy"), #Gradio 4.7.1
110
- gr.Radio(["History","H+P","Impression/Plan","Full Visit","Handover","Psych","EMS","SBAR","Meds Only"], show_label=False),
111
  ]
112
 
113
  ui = gr.Interface(fn=transcribe,
 
23
  "Impression/Plan": "Weldon_Impression_Note_Format.txt",
24
  "Handover": "Weldon_Handover_Note_Format.txt",
25
  "Meds Only": "Medications.txt",
 
26
  "Triage": "Triage_Note_Format.txt",
27
  "Full Visit": "Weldon_Full_Visit_Format.txt",
28
  "Psych": "Weldon_Psych_Format.txt",
29
+ "SOAP": "Fell_SOAP_Note.txt"
30
  }
31
 
32
+ file_name = history_type_map.get(history_type, "Fell_SOAP_Note.txt")
33
  with open(f"Format_Library/{file_name}", "r") as f:
34
  role = f.read()
35
 
 
104
 
105
  #Define Gradio Interface
106
  my_inputs = [
107
+ gr.Audio(source="microphone", type="filepath"), #Gradio 3.48.0 (OG version)
108
+ #gr.Audio(sources=["microphone"],type="numpy"), #Gradio 4.7.1 and later
109
+ gr.Radio(["History","H+P","Impression/Plan","Full Visit","Handover","Psych","SOAP","Meds Only"], show_label=False),
110
  ]
111
 
112
  ui = gr.Interface(fn=transcribe,