Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ pipeline_ner =init_ner_pipeline()
|
|
49 |
st.header("Intelligent Document Automation")
|
50 |
|
51 |
def get_text_from_ocr_engine():
|
52 |
-
return "
|
53 |
|
54 |
with st.sidebar:
|
55 |
selected_menu = option_menu("Select Option",
|
@@ -67,6 +67,9 @@ elif selected_menu == "Extract Text":
|
|
67 |
elif selected_menu == "Summarize Document":
|
68 |
st.write(get_text_from_ocr_engine())
|
69 |
elif selected_menu == "Extract Entities":
|
70 |
-
|
|
|
|
|
|
|
71 |
elif selected_menu == "Get Answers":
|
72 |
st.write(get_text_from_ocr_engine())
|
|
|
49 |
st.header("Intelligent Document Automation")
|
50 |
|
51 |
def get_text_from_ocr_engine():
|
52 |
+
return "CASE: A 28-year-old previously healthy man presented with a 6-week history of palpitations. The symptoms occurred during rest, 2–3 times per week, lasted up to 30 minutes at a time and were associated with dyspnea. Except for a grade 2/6 holosystolic tricuspid regurgitation murmur (best heard at the left sternal border with inspiratory accentuation), physical examination yielded unremarkable findings."
|
53 |
|
54 |
with st.sidebar:
|
55 |
selected_menu = option_menu("Select Option",
|
|
|
67 |
elif selected_menu == "Summarize Document":
|
68 |
st.write(get_text_from_ocr_engine())
|
69 |
elif selected_menu == "Extract Entities":
|
70 |
+
text = get_text_from_ocr_engine()
|
71 |
+
output = pipeline_ner (text)
|
72 |
+
|
73 |
+
|
74 |
elif selected_menu == "Get Answers":
|
75 |
st.write(get_text_from_ocr_engine())
|