mirror of
https://github.com/tiennm99/phow2sim.git
synced 2026-09-02 12:20:45 +00:00
refactor: remove unused MODEL_VARIANT env var
Was set in Dockerfile/compose/.env/README but never read by the app. Tokenization is inferred at lookup time by _variant_candidates trying both spaced and underscore-joined forms.
This commit is contained in:
+1
-2
@@ -10,6 +10,5 @@
|
||||
# MODEL_URL=https://cloud.example.com/s/abc123XYZ/download
|
||||
MODEL_URL=https://cloud.example.com/s/REPLACE_ME/download
|
||||
|
||||
# Variant — must match the filename inside the zip.
|
||||
# Must match the filename inside the zip.
|
||||
MODEL_PATH=/data/phow2v/word2vec_vi_words_300dims.txt
|
||||
MODEL_VARIANT=word
|
||||
|
||||
@@ -16,7 +16,6 @@ COPY app ./app
|
||||
# PhoW2V's license forbids public redistribution, so every deployment
|
||||
# must point at its own private mirror (typically Nextcloud WebDAV).
|
||||
ENV MODEL_PATH=/data/phow2v/word2vec_vi_words_300dims.txt \
|
||||
MODEL_VARIANT=word \
|
||||
PORT=8000
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
@@ -110,7 +110,6 @@ Host the desired zip and update `.env`:
|
||||
```bash
|
||||
MODEL_URL=https://cloud.example.com/s/<token-for-syllables-100>/download
|
||||
MODEL_PATH=/data/phow2v/word2vec_vi_syllables_100dims.txt
|
||||
MODEL_VARIANT=syllable
|
||||
```
|
||||
|
||||
Delete the `phow2v-cache` volume when switching, otherwise the stale
|
||||
@@ -126,7 +125,6 @@ docker compose down -v && docker compose up --build
|
||||
|---|---|---|
|
||||
| `MODEL_URL` | *(required)* | Any URL that serves the zip via a plain GET. Bake any auth into the URL. |
|
||||
| `MODEL_PATH` | `/data/phow2v/word2vec_vi_words_300dims.txt` | Where the text-format vectors are persisted. |
|
||||
| `MODEL_VARIANT` | `word` | `word` or `syllable`. Declarative hint; must match the file you uploaded. |
|
||||
|
||||
## Using from doantu (miti99bot)
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ services:
|
||||
# https://cloud.example.com/s/<shareToken>/download
|
||||
MODEL_URL: ${MODEL_URL:?set MODEL_URL in .env to your PhoW2V zip URL}
|
||||
MODEL_PATH: ${MODEL_PATH:-/data/phow2v/word2vec_vi_words_300dims.txt}
|
||||
MODEL_VARIANT: ${MODEL_VARIANT:-word}
|
||||
volumes:
|
||||
- phow2v-cache:/data/phow2v
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user