Spaces:
Running
Running
load model with autoloader
Browse files
app.py
CHANGED
@@ -10,9 +10,10 @@ import numpy as np
|
|
10 |
|
11 |
from torchmoji.sentence_tokenizer import SentenceTokenizer
|
12 |
from torchmoji.model_def import torchmoji_emojis
|
13 |
-
|
14 |
model_name = "Uberduck/torchmoji"
|
15 |
-
|
|
|
16 |
vocab_path = './' + model_name + "/vocabulary.json"
|
17 |
|
18 |
def top_elements(array, k):
|
|
|
10 |
|
11 |
from torchmoji.sentence_tokenizer import SentenceTokenizer
|
12 |
from torchmoji.model_def import torchmoji_emojis
|
13 |
+
from transformers import AutoModel
|
14 |
model_name = "Uberduck/torchmoji"
|
15 |
+
model = AutoModel.from_pretrained(model_name)
|
16 |
+
model_path = model
|
17 |
vocab_path = './' + model_name + "/vocabulary.json"
|
18 |
|
19 |
def top_elements(array, k):
|