Spaces:
Running
Running
f to str
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ 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/{model_name}/pytorch_model.bin"
|
18 |
vocab_path = './' + model_name + "/vocabulary.json"
|
19 |
|
20 |
def top_elements(array, k):
|
|
|
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 = f"~/.cache/huggingface/hub/{model_name}/pytorch_model.bin"
|
18 |
vocab_path = './' + model_name + "/vocabulary.json"
|
19 |
|
20 |
def top_elements(array, k):
|