From 5195b160d146032a01ff5c851706ba811d215783 Mon Sep 17 00:00:00 2001
From: kev <vimagick@gmail.com>
Date: Mon, 9 Dec 2019 08:33:02 +0800
Subject: [PATCH] update ludwig

---
 ludwig/Dockerfile         | 12 +-----------
 ludwig/README.md          |  2 +-
 ludwig/docker-compose.yml |  8 ++++----
 tesseract/README.md       |  3 +--
 4 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/ludwig/Dockerfile b/ludwig/Dockerfile
index c2daee9..ec48852 100644
--- a/ludwig/Dockerfile
+++ b/ludwig/Dockerfile
@@ -1,14 +1,4 @@
 FROM tensorflow/tensorflow:latest-py3
-
-RUN apt-get -y install git
-
-RUN git clone --depth=1 https://github.com/uber/ludwig.git \
-    && cd ludwig/ \
-    && pip install -r requirements.txt -r requirements_text.txt \
-          -r requirements_image.txt -r requirements_audio.txt \
-          -r requirements_serve.txt -r requirements_viz.txt \
-    && python setup.py install
-
+RUN pip install ludwig[full]
 WORKDIR /data
-
 ENTRYPOINT ["ludwig"]
diff --git a/ludwig/README.md b/ludwig/README.md
index 8d28555..9a51e02 100644
--- a/ludwig/README.md
+++ b/ludwig/README.md
@@ -48,7 +48,7 @@ $ tree -L 3 data
 ├── predict.csv
 ├── train.csv
 ├── results
-│   └── experiment_run
+│   └── experiment_example
 │       ├── description.json
 │       ├── model
 │       └── training_statistics.json
diff --git a/ludwig/docker-compose.yml b/ludwig/docker-compose.yml
index 5b08239..af48997 100644
--- a/ludwig/docker-compose.yml
+++ b/ludwig/docker-compose.yml
@@ -1,24 +1,24 @@
 train:
   image: vimagick/ludwig
-  command: train --data_csv train.csv -mdf model.yaml
+  command: train --model_name example --data_csv train.csv -mdf model.yaml
   volumes:
     - ./data:/data
 
 visualize:
   image: vimagick/ludwig
-  command: visualize -v learning_curves -trs results/experiment_run/training_statistics.json -od visualize -ff png
+  command: visualize -v learning_curves -trs results/experiment_example/training_statistics.json -od visualize -ff png
   volumes:
     - ./data:/data
 
 predict:
   image: vimagick/ludwig
-  command: predict --data_csv predict.csv -m results/experiment_run/model
+  command: predict --data_csv predict.csv -m results/experiment_example/model
   volumes:
     - ./data:/data
 
 serve:
   image: vimagick/ludwig
-  command: serve -m results/experiment_run/model -p 8000
+  command: serve -m results/experiment_example/model -p 8000
   ports:
     - "8000:8000"
   volumes:
diff --git a/tesseract/README.md b/tesseract/README.md
index 25c84fa..0f7f4b6 100644
--- a/tesseract/README.md
+++ b/tesseract/README.md
@@ -20,8 +20,7 @@ $ tesseract input.png output -l eng --psm 3
 $ cat output.txt
 The (quick) [brown] {fox} jumps!
 
-$ tesseract chinese.jpg chinese -l chi_tra --psm 8 --oem 0
-$ cat chinese.txt
+$ tesseract chinese.jpg stdout -l chi_tra --psm 8 --oem 0
 學習
 ```