Skip to content

Commit 070f2e5

Browse files
committed
docker compose working
1 parent d720274 commit 070f2e5

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
data/
77
docker/
88
nbs/
9+
models/
10+
db/
911

1012
.git/
1113
.github/

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,8 @@ cython_debug/
160160
# and can be added to the global gitignore or merged into this file. For a more nuclear
161161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162162
#.idea/
163+
164+
# Databases and Models
165+
*.db
166+
models/*
167+
!models/.gitkeep

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ services:
99
volumes:
1010
- ./db:/app/db
1111
- ./models:/app/models # Mount machine learning model folder
12-
environment:
13-
- ENV=docker-compose
1412

1513
frontend:
1614
build:
@@ -20,3 +18,5 @@ services:
2018
- "8501:8501"
2119
depends_on:
2220
- backend
21+
environment:
22+
- ENV=docker-compose

models/.gitkeep

Whitespace-only changes.

src/moin_moin/frontend/_user_input.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ def main() -> None:
7171
"tags": ",".join(tags) if tags else "",
7272
},
7373
files={"image_bytes": ("image.jpg", buffer, "image/jpeg")},
74+
timeout=10,
7475
).json()["record-id"]
7576

7677
result = httpx.post(
7778
f"{BACKEND_URL}/predict",
7879
data={"record_id": record_id},
7980
files={"file": ("image.jpg", buffer, "image/jpeg")},
81+
timeout=10,
8082
).json()["prediction"]
8183

8284
st.header(f"Assigned Institution: {result}")

0 commit comments

Comments
 (0)