wjbmattingly commited on
Commit
7944035
1 Parent(s): 87e06fb

adding catmus-medieval

Browse files
Files changed (4) hide show
  1. Dockerfile +2 -2
  2. app/main.py +1 -1
  3. catmus-medieval.mlmodel +3 -0
  4. send_image.py +1 -1
Dockerfile CHANGED
@@ -19,8 +19,8 @@ COPY ./requirements.txt /code/requirements.txt
19
  # Install Python dependencies
20
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
21
 
22
- # Download and install the Kraken model
23
- RUN kraken get 10.5281/zenodo.12743230
24
 
25
  # Copy the FastAPI app into the container
26
  COPY ./app /code/app
 
19
  # Install Python dependencies
20
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
21
 
22
+ # Copy the Kraken model file from the root directory to /code
23
+ COPY ./catmus-medieval.mlmodel /code/catmus-medieval.mlmodel
24
 
25
  # Copy the FastAPI app into the container
26
  COPY ./app /code/app
app/main.py CHANGED
@@ -171,7 +171,7 @@ async def process_all(
171
 
172
  # Step 3: OCR
173
  try:
174
- model = models.load_any(models.get_model_path(model_name))
175
  except KrakenInvalidModelException:
176
  raise HTTPException(status_code=400, detail=f"Model '{model_name}' not found or invalid")
177
 
 
171
 
172
  # Step 3: OCR
173
  try:
174
+ model = models.load_any(model_name)
175
  except KrakenInvalidModelException:
176
  raise HTTPException(status_code=400, detail=f"Model '{model_name}' not found or invalid")
177
 
catmus-medieval.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1c1fd46af4003b8cf9b18c7049f93f48a8df07f2cbdf29c1d407affe9e251bd
3
+ size 16332989
send_image.py CHANGED
@@ -2,7 +2,7 @@ import requests
2
  import os
3
 
4
  # API endpoint
5
- url = "https://wjbmattingly-kraken-api.hf.space/detect_lines"
6
 
7
  # Path to the image file
8
  image_path = os.path.join("data", "ms.jpg")
 
2
  import os
3
 
4
  # API endpoint
5
+ url = "https://wjbmattingly-kraken-api.hf.space/ocr"
6
 
7
  # Path to the image file
8
  image_path = os.path.join("data", "ms.jpg")