jy395 commited on
Commit
093276c
·
verified ·
1 Parent(s): d3bd56a

Create Makefile

Browse files
Files changed (1) hide show
  1. Makefile +39 -0
Makefile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ install:
2
+ pip install --upgrade pip &&\
3
+ pip install -r requirements.txt
4
+
5
+ format:
6
+ black *.py
7
+
8
+ train:
9
+ python train.py
10
+
11
+ eval:
12
+ echo "## Model Metrics" > report.md
13
+ cat ./Results/metrics.txt >> report.md
14
+
15
+ echo '\n## Confusion Matrix Plot' >> report.md
16
+ echo '![Confusion Matrix](./Results/model_results.png)' >> report.md
17
+
18
+ cml comment create report.md
19
+
20
+ update-branch:
21
+ git config --global user.name $(USER_NAME)
22
+ git config --global user.email $(USER_EMAIL)
23
+ git commit -am "Update with new results"
24
+ git push --force origin HEAD:update
25
+
26
+ hf-login:
27
+ pip install -U "huggingface_hub[cli]"
28
+ git pull origin update
29
+ git switch update
30
+ huggingface-cli login --token $(HF) --add-to-git-credential
31
+
32
+ push-hub:
33
+ huggingface-cli upload kingabzpro/Drug-Classification ./App --repo-type=space --commit-message="Sync App files"
34
+ huggingface-cli upload kingabzpro/Drug-Classification ./Model /Model --repo-type=space --commit-message="Sync Model"
35
+ huggingface-cli upload kingabzpro/Drug-Classification ./Results /Metrics --repo-type=space --commit-message="Sync Model"
36
+
37
+ deploy: hf-login push-hub
38
+
39
+ all: install format train eval update-branch deploy