com3dian commited on
Commit
e5ef7f9
·
1 Parent(s): e53bd80

fix config.json

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -5
  2. app.py +1 -1
  3. grobidconfig.json +7 -0
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.8.9 AS base
2
 
3
  WORKDIR /app
4
 
@@ -8,10 +8,6 @@ COPY ./packages.txt /app/packages.txt
8
  RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
9
  RUN pip3 install --no-cache-dir -r /app/requirements.txt
10
 
11
- FROM lfoppiano/grobid:0.8.0 AS grobid
12
-
13
- FROM base AS final
14
-
15
  RUN git clone https://github.com/kermitt2/grobid_client_python && \
16
  cd grobid_client_python && \
17
  python3 setup.py install
 
1
+ FROM python:3.8.9
2
 
3
  WORKDIR /app
4
 
 
8
  RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
9
  RUN pip3 install --no-cache-dir -r /app/requirements.txt
10
 
 
 
 
 
11
  RUN git clone https://github.com/kermitt2/grobid_client_python && \
12
  cd grobid_client_python && \
13
  python3 setup.py install
app.py CHANGED
@@ -23,7 +23,7 @@ if uploaded_file is not None:
23
  saved_file_path = save_uploaded_file(uploaded_file)
24
 
25
  os.makedirs("grobidoutputs", exist_ok=True)
26
- client = GrobidClient(config_path="./config.json")
27
  client.process("processFulltextDocument",
28
  "./uploads/",
29
  output="./grobidoutputs/",
 
23
  saved_file_path = save_uploaded_file(uploaded_file)
24
 
25
  os.makedirs("grobidoutputs", exist_ok=True)
26
+ client = GrobidClient(config_path="./grobidconfig.json")
27
  client.process("processFulltextDocument",
28
  "./uploads/",
29
  output="./grobidoutputs/",
grobidconfig.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "grobid_server": "cloud.science-miner.com/grobid",
3
+ "batch_size": 100,
4
+ "sleep_time": 5,
5
+ "timeout": 60,
6
+ "coordinates": [ "persName", "figure", "ref", "biblStruct", "formula", "s", "note", "title" ]
7
+ }