Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,23 +40,24 @@ def process_text(input_text):
|
|
40 |
|
41 |
def get_completion(prompt, model='gpt-3.5-turbo'):
|
42 |
messages = [
|
43 |
-
{"role": "system", "content": """You are a world class nurse practitioner. You are provided with the transcription
|
44 |
-
Extract the following information from the transcription, replace curly brackets with relevant extracted information, and present as follows, one category per line: \
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
60 |
|
61 |
Only use the information from the provided transcription. Do not make up stuff. If information is not available just put "N/A" next to the relevant line.
|
62 |
"""
|
@@ -74,10 +75,12 @@ def get_completion(prompt, model='gpt-3.5-turbo'):
|
|
74 |
with gr.Blocks() as demo:
|
75 |
|
76 |
gr.Markdown("""
|
77 |
-
#
|
78 |
|
79 |
-
This is to make life of
|
80 |
-
|
|
|
|
|
81 |
""")
|
82 |
|
83 |
|
@@ -85,7 +88,8 @@ with gr.Blocks() as demo:
|
|
85 |
audio = gr.Audio(source="microphone", type="filepath")
|
86 |
|
87 |
b1 = gr.Button("Transcribe audio")
|
88 |
-
b2 = gr.Button("Prepare a report")
|
|
|
89 |
|
90 |
|
91 |
text1 = gr.Textbox(lines=5)
|
|
|
40 |
|
41 |
def get_completion(prompt, model='gpt-3.5-turbo'):
|
42 |
messages = [
|
43 |
+
{"role": "system", "content": """You are a world class nurse practitioner. You are provided with the transcription of a patient's recording in a non-English language prior to doctor's visit. \
|
44 |
+
Extract the following information from the transcription, replace curly brackets with relevant extracted information, and present in English as follows, one category per line: \
|
45 |
|
46 |
+
Demographic information: {name, age, gender, address, phone number}
|
47 |
+
|
48 |
+
Medical history: {chronic health conditions, any past surgery, any hospitalization, current medications}
|
49 |
+
|
50 |
+
Symptoms: {current symptoms, when did they start, how did they progress}
|
51 |
+
|
52 |
+
Allergies: {any known allergies, any allergic reaction to medications}
|
53 |
+
|
54 |
+
Family history: {any family members with chronic health condition, anyone in the family with a hereditary condition?}
|
55 |
+
|
56 |
+
Lifestyle factors: {typical diet, how often you exercise, smoking, drinking alcohol}
|
57 |
+
|
58 |
+
Psychosocial factors: {stress, anxiety, any mental health condition}
|
59 |
+
|
60 |
+
Review of systems: {any issues with vision or hearing, digestive issues, any problems with skin or nails, any problems with joints or muscles}
|
61 |
|
62 |
Only use the information from the provided transcription. Do not make up stuff. If information is not available just put "N/A" next to the relevant line.
|
63 |
"""
|
|
|
75 |
with gr.Blocks() as demo:
|
76 |
|
77 |
gr.Markdown("""
|
78 |
+
# Meet your doctor <br>
|
79 |
|
80 |
+
This is to make life of non-English speaking patients easier.
|
81 |
+
Describe your complaints and symptoms in your native language , have it emailed to your doctor prior to your visit.
|
82 |
+
Information that is useful to include: your name, age, gender, address, phone number, medical history, symptoms, allergies, family medical history, lifestyle factors.
|
83 |
+
Have it all recorded, transcribed, and presented in a standard form.
|
84 |
""")
|
85 |
|
86 |
|
|
|
88 |
audio = gr.Audio(source="microphone", type="filepath")
|
89 |
|
90 |
b1 = gr.Button("Transcribe audio")
|
91 |
+
b2 = gr.Button("Prepare a report in English")
|
92 |
+
b3 = gr.Button("Email report to your doctor")
|
93 |
|
94 |
|
95 |
text1 = gr.Textbox(lines=5)
|