Spaces:
Running
Running
save_pretrained
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ from torchmoji.model_def import torchmoji_emojis
|
|
| 13 |
from transformers import AutoModel, AutoTokenizer
|
| 14 |
model_name = "Pendrokar/TorchMoji"
|
| 15 |
model = AutoModel.from_pretrained(model_name, cache_dir="~/.cache/huggingface/hub/")
|
|
|
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 17 |
model_path = "~/.cache/huggingface/hub/TorchMoji/pytorch_model.bin"
|
| 18 |
vocab_path = './' + model_name + "/vocabulary.json"
|
|
|
|
| 13 |
from transformers import AutoModel, AutoTokenizer
|
| 14 |
model_name = "Pendrokar/TorchMoji"
|
| 15 |
model = AutoModel.from_pretrained(model_name, cache_dir="~/.cache/huggingface/hub/")
|
| 16 |
+
model.save_pretrained("~/.cache/huggingface/hub/TorchMoji/pytorch_model.bin")
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 18 |
model_path = "~/.cache/huggingface/hub/TorchMoji/pytorch_model.bin"
|
| 19 |
vocab_path = './' + model_name + "/vocabulary.json"
|