Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,8 @@ def get_text_from_ocr_engine():
|
|
52 |
return "This is a sample text for named entity recognition and other tasks"
|
53 |
|
54 |
with st.sidebar:
|
55 |
-
selected_menu = option_menu("Select Option",
|
|
|
56 |
menu_icon="cast", default_index=0)
|
57 |
|
58 |
|
@@ -61,5 +62,11 @@ if selected_menu == "Upload Document":
|
|
61 |
if uploaded_file is not None:
|
62 |
ocr_text = get_text_from_ocr_engine(uploaded_file)
|
63 |
st.write("Upload Successful")
|
64 |
-
elif selected_menu == "
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
st.write(get_text_from_ocr_engine())
|
|
|
52 |
return "This is a sample text for named entity recognition and other tasks"
|
53 |
|
54 |
with st.sidebar:
|
55 |
+
selected_menu = option_menu("Select Option",
|
56 |
+
["Upload Document", "Extract Text", "Summarize Document", "Extract Entities","Get Answers"],
|
57 |
menu_icon="cast", default_index=0)
|
58 |
|
59 |
|
|
|
62 |
if uploaded_file is not None:
|
63 |
ocr_text = get_text_from_ocr_engine(uploaded_file)
|
64 |
st.write("Upload Successful")
|
65 |
+
elif selected_menu == "Extract Text":
|
66 |
+
st.write(get_text_from_ocr_engine())
|
67 |
+
elif selected_menu == "Summarize Document":
|
68 |
+
st.write(get_text_from_ocr_engine())
|
69 |
+
elif selected_menu == "Extract Entities":
|
70 |
+
st.write(get_text_from_ocr_engine())
|
71 |
+
elif selected_menu == "Get Answers":
|
72 |
st.write(get_text_from_ocr_engine())
|