Luis Chaves commited on
Commit
14cef21
·
1 Parent(s): ef61402

fixed import error of local module

Browse files
Files changed (7) hide show
  1. Dockerfile +1 -1
  2. j.json +1 -0
  3. learning.md +5 -0
  4. pyproject.toml +2 -1
  5. src/everycure/app.py +1 -1
  6. src/everycure/extractor.py +1 -1
  7. uv.lock +1 -1
Dockerfile CHANGED
@@ -9,4 +9,4 @@ COPY ./openapi.yaml /code/
9
 
10
  RUN pip install --no-cache-dir .[all]
11
 
12
- CMD ["python", "-m", "everycure.app"]
 
9
 
10
  RUN pip install --no-cache-dir .[all]
11
 
12
+ CMD ["uvicorn", "everycure.app:app", "--host", "0.0.0.0", "--port", "7860"]
j.json ADDED
@@ -0,0 +1 @@
 
 
1
+ Error: Could not connect to server at http://localhost:7860/api/v1/extract. Make sure the server is running.
learning.md CHANGED
@@ -61,6 +61,11 @@ https://huggingface.co/blaze999/Medical-NER
61
 
62
  <https://docs.astral.sh/uv/guides/integration/pytorch/#installing-pytorch>
63
 
 
 
 
 
 
64
  ## Parts to the problem
65
 
66
  - Check how good pdfplumber or PyMuPDF is at extracting text without butchering it.
 
61
 
62
  <https://docs.astral.sh/uv/guides/integration/pytorch/#installing-pytorch>
63
 
64
+
65
+ ## what's the max length that gliner accepts?
66
+
67
+ havent been able to find it
68
+
69
  ## Parts to the problem
70
 
71
  - Check how good pdfplumber or PyMuPDF is at extracting text without butchering it.
pyproject.toml CHANGED
@@ -11,7 +11,8 @@ dependencies = [
11
  "transformers>=4.48.1",
12
  "fastapi>=0.109.0",
13
  "python-multipart>=0.0.6", # Required for handling file uploads
14
- "pydantic>=2.5.3"
 
15
  ]
16
 
17
  [build-system]
 
11
  "transformers>=4.48.1",
12
  "fastapi>=0.109.0",
13
  "python-multipart>=0.0.6", # Required for handling file uploads
14
+ "pydantic>=2.5.3",
15
+ "uvicorn>=0.27.0"
16
  ]
17
 
18
  [build-system]
src/everycure/app.py CHANGED
@@ -1,6 +1,6 @@
1
  from fastapi import FastAPI, UploadFile, HTTPException
2
  from typing import List
3
- from extractor import Entity, extract_entities_from_pdf
4
  import logging
5
  import uvicorn
6
 
 
1
  from fastapi import FastAPI, UploadFile, HTTPException
2
  from typing import List
3
+ from everycure.extractor import Entity, extract_entities_from_pdf
4
  import logging
5
  import uvicorn
6
 
src/everycure/extractor.py CHANGED
@@ -6,7 +6,7 @@ from gliner import GLiNER
6
  import logging
7
 
8
  # Set up logging
9
- logging.basicConfig(level=logging.DEBUG)
10
  logger = logging.getLogger(__name__)
11
 
12
  class Entity(BaseModel):
 
6
  import logging
7
 
8
  # Set up logging
9
+ logging.basicConfig(level=logging.WARNING)
10
  logger = logging.getLogger(__name__)
11
 
12
  class Entity(BaseModel):
uv.lock CHANGED
@@ -165,7 +165,7 @@ wheels = [
165
  [[package]]
166
  name = "everycure"
167
  version = "0.1.0"
168
- source = { virtual = "." }
169
  dependencies = [
170
  { name = "fastapi" },
171
  { name = "marimo" },
 
165
  [[package]]
166
  name = "everycure"
167
  version = "0.1.0"
168
+ source = { editable = "." }
169
  dependencies = [
170
  { name = "fastapi" },
171
  { name = "marimo" },