nakamura196 commited on
Commit
1907e78
·
1 Parent(s): 6124561

feat: update description

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -2
  2. install.sh +1 -0
  3. src/app.py +11 -3
Dockerfile CHANGED
@@ -4,8 +4,9 @@ FROM python:3.10-slim AS base
4
  # 作業ディレクトリを設定
5
  WORKDIR /home/user/app
6
 
7
- # すべてのファイルをコピー
8
- COPY . /home/user/app/
 
9
 
10
  # install.sh を実行可能にして実行
11
  RUN chmod +x /home/user/app/install.sh && /home/user/app/install.sh
 
4
  # 作業ディレクトリを設定
5
  WORKDIR /home/user/app
6
 
7
+ COPY src /home/user/app/src
8
+ COPY requirements.txt /home/user/app/
9
+ COPY install.sh /home/user/app/
10
 
11
  # install.sh を実行可能にして実行
12
  RUN chmod +x /home/user/app/install.sh && /home/user/app/install.sh
install.sh CHANGED
@@ -1,4 +1,5 @@
1
  #!/bin/bash
2
  # サブモジュールを初期化して更新
3
  git submodule update --init --recursive
 
4
  cp -rp ndlkotenocr-lite/src .
 
1
  #!/bin/bash
2
  # サブモジュールを初期化して更新
3
  git submodule update --init --recursive
4
+ git submodule update --remote
5
  cp -rp ndlkotenocr-lite/src .
src/app.py CHANGED
@@ -15,9 +15,17 @@ import re
15
 
16
  # Model Heading and Description
17
  model_heading = "NDL Kotenseki OCR-Lite Gradio App"
18
- description = """Upload an image or click an example image to use."""
 
19
 
20
- article = "<p style='text-align: center'><a href=\"https://github.com/ndl-lab/ndlkotenocr-lite\">https://github.com/ndl-lab/ndlkotenocr-lite</a>.</p>"
 
 
 
 
 
 
 
21
 
22
  image_path = [
23
  ['samples/digidepo_1287221_00000002.jpg'],
@@ -166,7 +174,7 @@ def create_json(root):
166
 
167
  return alljsonobj
168
 
169
- # YOLO Inference Function
170
  def process(image_path: str):
171
  try:
172
  # Load the models
 
15
 
16
  # Model Heading and Description
17
  model_heading = "NDL Kotenseki OCR-Lite Gradio App"
18
+ description = """
19
+ Upload an image or click an example image to use.
20
 
21
+ Examples:
22
+ 1. 『竹取物語』上, 江戸前期. https://dl.ndl.go.jp/pid/1287221/1/2
23
+ 2. 曲亭馬琴 作 ほか『人間万事賽翁馬 3巻』, 鶴喜, 寛政12. https://dl.ndl.go.jp/pid/10301438/1/17
24
+ """
25
+
26
+ article = "This application is powered by NDL Kotenseki OCR-Lite. For more details, please visit the official repository: [NDL Kotenseki OCR-Lite GitHub Repository](https://github.com/ndl-lab/ndlkotenocr-lite)."
27
+
28
+ # <p style='text-align: center'><a href=\"https://github.com/ndl-lab/ndlkotenocr-lite\">https://github.com/ndl-lab/ndlkotenocr-lite</a>.</p>
29
 
30
  image_path = [
31
  ['samples/digidepo_1287221_00000002.jpg'],
 
174
 
175
  return alljsonobj
176
 
177
+ # Inference Function
178
  def process(image_path: str):
179
  try:
180
  # Load the models