com3dian commited on
Commit
9a0b416
·
verified ·
1 Parent(s): 7583d65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -30,20 +30,9 @@ if uploaded_file is not None:
30
  bytes_data = uploaded_file.getvalue()
31
  st.write(len(bytes_data), "bytes")
32
 
33
-
34
  saved_file_path = save_uploaded_file(uploaded_file)
35
- os.makedirs("./outputs", exist_ok=True)
36
- exec("grobid_client --input ./uploads/ --output ./outputs/ processFulltextDocument")
37
-
38
- # client = GrobidClient(config_path="./grobidconfig.json")
39
- # client.process("processFulltextDocument",
40
- # "./uploads/",
41
- # consolidate_citations=True,
42
- # tei_coordinates=True)
43
-
44
- output_file_path = os.path.splitext(saved_file_path)[0] + ".grobid.tei.xml"
45
  monkeyReader = reader.MonkeyReader(option)
46
- outline = monkeyReader.readOutline(output_file_path)
47
  for pre, fill, node in outline:
48
  st.write("%s%s" % (pre, node.name))
49
 
 
30
  bytes_data = uploaded_file.getvalue()
31
  st.write(len(bytes_data), "bytes")
32
 
 
33
  saved_file_path = save_uploaded_file(uploaded_file)
 
 
 
 
 
 
 
 
 
 
34
  monkeyReader = reader.MonkeyReader(option)
35
+ outline = monkeyReader.readOutline(saved_file_path)
36
  for pre, fill, node in outline:
37
  st.write("%s%s" % (pre, node.name))
38