Spaces:
Sleeping
Sleeping
Commit
·
7c62087
1
Parent(s):
1981742
fix: bug
Browse files- .gitignore +2 -1
- Dockerfile +19 -0
- README.md +1 -1
- docker-compose.yml +10 -0
- reuirements.txt → requirements.txt +0 -2
- src/app.py +2 -2
- default.jpg → src/samples/default.jpg +0 -0
.gitignore
CHANGED
@@ -2,4 +2,5 @@
|
|
2 |
.DS_Store
|
3 |
__pycache__
|
4 |
src/*
|
5 |
-
!src/app.py
|
|
|
|
2 |
.DS_Store
|
3 |
__pycache__
|
4 |
src/*
|
5 |
+
!src/app.py
|
6 |
+
!src/samples
|
Dockerfile
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# ベースイメージ
|
2 |
+
FROM python:3.10
|
3 |
+
|
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
|
12 |
+
|
13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
+
|
15 |
+
# 作業ディレクトリを `src` に移動
|
16 |
+
WORKDIR /home/user/app/src
|
17 |
+
|
18 |
+
# アプリを起動
|
19 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
@@ -5,7 +5,7 @@ colorFrom: red
|
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.7.1
|
8 |
-
app_file:
|
9 |
pinned: false
|
10 |
---
|
11 |
|
|
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.7.1
|
8 |
+
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
|
docker-compose.yml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
services:
|
2 |
+
app:
|
3 |
+
build:
|
4 |
+
context: .
|
5 |
+
dockerfile: Dockerfile
|
6 |
+
container_name: ndlkotenocr-lite-app
|
7 |
+
volumes:
|
8 |
+
- .:/home/user/app
|
9 |
+
ports:
|
10 |
+
- "7860:7860"
|
reuirements.txt → requirements.txt
RENAMED
@@ -1,6 +1,4 @@
|
|
1 |
-
# git+https://github.com/ndl-lab/ndlkotenocr-lite
|
2 |
dill
|
3 |
-
flet
|
4 |
lxml
|
5 |
networkx
|
6 |
numpy
|
|
|
|
|
1 |
dill
|
|
|
2 |
lxml
|
3 |
networkx
|
4 |
numpy
|
src/app.py
CHANGED
@@ -15,7 +15,7 @@ description = """YOLOv11x くずし字認識サービス(一文字) Gradio d
|
|
15 |
article = "<p style='text-align: center'>YOLOv11x くずし字認識サービス(一文字) is a classification model trained on the <a href=\"https://lab.hi.u-tokyo.ac.jp/datasets/kuzushiji\">東京大学史料編纂所くずし字データセット</a>.</p>"
|
16 |
|
17 |
image_path = [
|
18 |
-
['
|
19 |
]
|
20 |
|
21 |
# Functions to load models
|
@@ -92,4 +92,4 @@ demo = gr.Interface(
|
|
92 |
cache_examples=False
|
93 |
)
|
94 |
|
95 |
-
demo.launch(share=False)
|
|
|
15 |
article = "<p style='text-align: center'>YOLOv11x くずし字認識サービス(一文字) is a classification model trained on the <a href=\"https://lab.hi.u-tokyo.ac.jp/datasets/kuzushiji\">東京大学史料編纂所くずし字データセット</a>.</p>"
|
16 |
|
17 |
image_path = [
|
18 |
+
['samples/default.jpg']
|
19 |
]
|
20 |
|
21 |
# Functions to load models
|
|
|
92 |
cache_examples=False
|
93 |
)
|
94 |
|
95 |
+
demo.launch(share=False, server_name="0.0.0.0")
|
default.jpg → src/samples/default.jpg
RENAMED
File without changes
|