Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions wine-reviews/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.10.4


WORKDIR /app

RUN pip install cython spacy
RUN python -m spacy download en_core_web_lg

COPY requirements.txt /app
RUN pip install -r requirements.txt

RUN python -m nltk.downloader stopwords punkt

COPY data_prep.py /app
COPY split.py /app
COPY prep_files.py /app
COPY test.py /app
COPY UtilTextClassification.py /app
COPY config.cfg /app
COPY service.py /app

37 changes: 37 additions & 0 deletions wine-reviews/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This Makefile is a reference for setting up and running various parts of this demo quickly
ifeq ($(PC25),)
pachcmd := pachctl
else
pachcmd=/opt/homebrew/Cellar/pachctl@2.5/v2.5.0-alpha.4/bin/pachctl
endif


wine-classifer:
$(pachcmd) update repo wine-reviews
$(pachcmd) update pipeline -f pipelines/prep_reviews.yaml
$(pachcmd) update pipeline -f pipelines/split_data.yaml
$(pachcmd) update pipeline -f pipelines/prep_files.yaml
$(pachcmd) update pipeline -f pipelines/train_model.yaml
$(pachcmd) update pipeline -f pipelines/test_model.yaml
$(pachcmd) put file wine-reviews@master -f data/winemag-data-130k-v2.csv
# $(pachcmd) put file wine-reviews@master -f data/winemag-data_first150k.csv

create-ui:
$(pachcmd) update pipeline -f pipelines/svc_pipe.yaml

cleanup:
$(pachcmd) delete pipeline test_model
$(pachcmd) delete pipeline classifer-serving
$(pachcmd) delete pipeline train_model
$(pachcmd) delete pipeline prep_files
$(pachcmd) delete pipeline split_data
$(pachcmd) delete pipeline prep_reviews
$(pachcmd) delete repo wine-reviews


.PHONY: \
echo \
wine-classifer \
create-ui \
cleanup

Loading