com3dian commited on
Commit
0ed5911
·
verified ·
1 Parent(s): 77bbf66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -25,29 +25,29 @@ st.title('Paper2Slides')
25
 
26
  st.subheader('Upload paper in pdf format')
27
 
28
- col1, col2 = st.columns([3, 1])
29
- with col1:
30
- uploaded_file = st.file_uploader("Choose a file")
31
- with col2:
32
- option = st.selectbox(
33
- 'Select parsing method.',
34
- ('monkey', 'x2d', 'lxml'))
35
-
36
- if uploaded_file is not None:
37
 
38
- st.write(uploaded_file.name)
39
- bytes_data = uploaded_file.getvalue()
40
- st.write(len(bytes_data), "bytes")
41
 
42
- saved_file_path = save_uploaded_file(uploaded_file)
43
- monkeyReader = reader.MonkeyReader(option)
44
- outline = monkeyReader.readOutline(saved_file_path)
45
- for pre, fill, node in outline:
46
- st.write("%s%s" % (pre, node.name))
47
 
48
 
49
- # read paper content
50
- essay = monkeyReader.readEssay(saved_file_path)
51
 
52
  # with st.status("Understanding paper..."):
53
 
 
25
 
26
  st.subheader('Upload paper in pdf format')
27
 
28
+ # col1, col2 = st.columns([3, 1])
29
+ # with col1:
30
+ # uploaded_file = st.file_uploader("Choose a file")
31
+ # with col2:
32
+ # option = st.selectbox(
33
+ # 'Select parsing method.',
34
+ # ('monkey', 'x2d', 'lxml'))
35
+
36
+ # if uploaded_file is not None:
37
 
38
+ # st.write(uploaded_file.name)
39
+ # bytes_data = uploaded_file.getvalue()
40
+ # st.write(len(bytes_data), "bytes")
41
 
42
+ # saved_file_path = save_uploaded_file(uploaded_file)
43
+ # monkeyReader = reader.MonkeyReader(option)
44
+ # outline = monkeyReader.readOutline(saved_file_path)
45
+ # for pre, fill, node in outline:
46
+ # st.write("%s%s" % (pre, node.name))
47
 
48
 
49
+ # # read paper content
50
+ # essay = monkeyReader.readEssay(saved_file_path)
51
 
52
  # with st.status("Understanding paper..."):
53