Sasidhar commited on
Commit
1deb102
·
1 Parent(s): 6ab4f0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -111,8 +111,11 @@ with st.sidebar:
111
  if selected_menu == "Upload Document":
112
  uploaded_file = st.file_uploader("Choose a file")
113
  if uploaded_file is not None:
114
- ocr_text = get_text_from_ocr_engine()
115
- st.write("Upload Successful")
 
 
 
116
 
117
  elif selected_menu == "Extract Text":
118
  with st.spinner("Extracting Text..."):
 
111
  if selected_menu == "Upload Document":
112
  uploaded_file = st.file_uploader("Choose a file")
113
  if uploaded_file is not None:
114
+ os.makedirs(os.path.join("/","uploaded_files"),mode = 0o777, exist_ok = True)
115
+ file_path = os.path.join("/","uploaded_files",uploaded_file.name)
116
+
117
+ with open(file_path,"wb") as f:
118
+ f.write(uploaded_file.getbuffer())
119
 
120
  elif selected_menu == "Extract Text":
121
  with st.spinner("Extracting Text..."):