Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
"
|
| 31 |
}
|
| 32 |
|
| 33 |
-
file_name = history_type_map.get(history_type, "
|
| 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","
|
| 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,
|