Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,17 +39,16 @@ pipeline_zsl, template = init_zsl_topic_classification()
|
|
39 |
|
40 |
st.header("Intelligent Document Automation")
|
41 |
|
42 |
-
uploaded_file = st.file_uploader("Choose a file")
|
43 |
-
|
44 |
def get_text_from_ocr_engine(uploaded_file):
|
45 |
return "This is a sample text for named entity recognition and other tasks"
|
46 |
|
47 |
with st.sidebar:
|
48 |
selected_menu = option_menu("Select Option", ["Upload Document", "Extract Text", "Summarize Document", "Extract Entities","Get Answers "],
|
49 |
-
menu_icon="cast", default_index=
|
50 |
|
51 |
|
52 |
-
if selected_menu == "Upload Document":
|
|
|
53 |
if uploaded_file is not None:
|
54 |
ocr_text = get_text_from_ocr_engine(uploaded_file)
|
55 |
st.write("Upload Successful")
|
|
|
39 |
|
40 |
st.header("Intelligent Document Automation")
|
41 |
|
|
|
|
|
42 |
def get_text_from_ocr_engine(uploaded_file):
|
43 |
return "This is a sample text for named entity recognition and other tasks"
|
44 |
|
45 |
with st.sidebar:
|
46 |
selected_menu = option_menu("Select Option", ["Upload Document", "Extract Text", "Summarize Document", "Extract Entities","Get Answers "],
|
47 |
+
menu_icon="cast", default_index=0)
|
48 |
|
49 |
|
50 |
+
if selected_menu == "Upload Document":
|
51 |
+
uploaded_file = st.file_uploader("Choose a file")
|
52 |
if uploaded_file is not None:
|
53 |
ocr_text = get_text_from_ocr_engine(uploaded_file)
|
54 |
st.write("Upload Successful")
|