Skip to content

Commit

Permalink
add .env gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
davebulaval committed Mar 18, 2024
1 parent 8957e81 commit 16ccf47
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
__pycache__/

meaningbert

.env
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Its goal is to assess meaning preservation between two sentences that correlate
checks. For more details, refer to our publicly available article.

> This public version of our model uses the best model trained (where in our article, we present the performance results
> of an average of 10 models) for a more extended period (1,000 epochs instead of 250). We have observed later that the
> model can further reduce dev loss and increase performance.
> of an average of 10 models) for a more extended period (500 epochs instead of 250). We have observed later that the
> model can further reduce dev loss and increase performance. Also, we have changed the data augmentation technique use
> in the article for a more robust one.
- [HuggingFace Model Card](https://huggingface.co/davebulaval/MeaningBERT)
- [HuggingFace Metric Card]()

## Sanity Check

Expand Down
1 change: 1 addition & 0 deletions datastore/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/V1
/V2
6 changes: 6 additions & 0 deletions datastore/V2.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
outs:
- md5: 44c355ec08f57d43542c375519260f3b.dir
size: 438905054
nfiles: 7
hash: md5
path: V2
8 changes: 7 additions & 1 deletion push_model_to_hub.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import os.path

import huggingface_hub
from dotenv import dotenv_values
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_path = os.path.join("datastore", "V1")
secrets = dotenv_values(".env")

huggingface_hub.login(token=secrets["huggingface_token"])

model_path = os.path.join(".", "datastore", "V2")
model = AutoModelForSequenceClassification.from_pretrained(model_path)

model.push_to_hub("davebulaval/MeaningBERT")
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

pytorch
tensorflow[and-cuda]
keras
keras
dotenv

0 comments on commit 16ccf47

Please sign in to comment.