com3dian commited on
Commit
df8e5ee
·
1 Parent(s): 26c213f

add reader

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -19,3 +19,13 @@ if uploaded_file is not None:
19
  bytes_data = uploaded_file.getvalue()
20
  st.write(len(bytes_data), "bytes")
21
  saved_file_path = save_uploaded_file(uploaded_file)
 
 
 
 
 
 
 
 
 
 
 
19
  bytes_data = uploaded_file.getvalue()
20
  st.write(len(bytes_data), "bytes")
21
  saved_file_path = save_uploaded_file(uploaded_file)
22
+
23
+
24
+ monkeyReader = grobidmonkey.reader.MonkeyReader('monkey')
25
+ outline = monkeyReader.readOutline(saved_file_path)
26
+
27
+ for pre, fill, node in outline:
28
+ st.write("%s%s" % (pre, node.name))
29
+
30
+ # read paper content
31
+ essay = monkeyReader.readEssay(saved_file_path)