Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,23 +38,6 @@ def transcribe(audio):
|
|
| 38 |
return result.text
|
| 39 |
|
| 40 |
|
| 41 |
-
prompt = f"""
|
| 42 |
-
You are a world class nurse practitioner. You are provided with text delimited by triple quotes. \
|
| 43 |
-
Summarize the text and put it in a table format with rows as follows: \
|
| 44 |
-
|
| 45 |
-
1. Patient identification:
|
| 46 |
-
2. Chief complaint:
|
| 47 |
-
3. Medical history:
|
| 48 |
-
4. Family history:
|
| 49 |
-
5. Social history:
|
| 50 |
-
6. Review of systems:
|
| 51 |
-
7. Current medications:
|
| 52 |
-
8. Vaccination status:
|
| 53 |
-
9. Emotional well-being:
|
| 54 |
-
10. Patient concerns and expectations:
|
| 55 |
-
|
| 56 |
-
\"\"\"{text1}\"\"\"
|
| 57 |
-
"""
|
| 58 |
|
| 59 |
# gr.Interface(
|
| 60 |
# title = 'Talk to NP',
|
|
@@ -84,11 +67,30 @@ with demo:
|
|
| 84 |
text1 = gr.Textbox()
|
| 85 |
text2 = gr.Textbox()
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
b1 = gr.Button("Transcribe audio")
|
| 88 |
b2 = gr.Button("Summarize")
|
| 89 |
|
| 90 |
b1.click(transcribe, inputs=audio_file, outputs=text1)
|
| 91 |
b2.click(get_completion, inputs=text1, outputs=text2)
|
| 92 |
|
|
|
|
| 93 |
demo.launch()
|
| 94 |
|
|
|
|
| 38 |
return result.text
|
| 39 |
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
# gr.Interface(
|
| 43 |
# title = 'Talk to NP',
|
|
|
|
| 67 |
text1 = gr.Textbox()
|
| 68 |
text2 = gr.Textbox()
|
| 69 |
|
| 70 |
+
prompt = f"""
|
| 71 |
+
You are a world class nurse practitioner. You are provided with text delimited by triple quotes. \
|
| 72 |
+
Summarize the text and put it in a table format with rows as follows: \
|
| 73 |
+
|
| 74 |
+
1. Patient identification:
|
| 75 |
+
2. Chief complaint:
|
| 76 |
+
3. Medical history:
|
| 77 |
+
4. Family history:
|
| 78 |
+
5. Social history:
|
| 79 |
+
6. Review of systems:
|
| 80 |
+
7. Current medications:
|
| 81 |
+
8. Vaccination status:
|
| 82 |
+
9. Emotional well-being:
|
| 83 |
+
10. Patient concerns and expectations:
|
| 84 |
+
|
| 85 |
+
\"\"\"{text1}\"\"\"
|
| 86 |
+
"""
|
| 87 |
+
|
| 88 |
b1 = gr.Button("Transcribe audio")
|
| 89 |
b2 = gr.Button("Summarize")
|
| 90 |
|
| 91 |
b1.click(transcribe, inputs=audio_file, outputs=text1)
|
| 92 |
b2.click(get_completion, inputs=text1, outputs=text2)
|
| 93 |
|
| 94 |
+
|
| 95 |
demo.launch()
|
| 96 |
|