Spaces:
Runtime error
Runtime error
Remove converting to PyTorch
Browse files
app.py
CHANGED
@@ -11,9 +11,9 @@ def load_model(masked_text,model_name):
|
|
11 |
|
12 |
model = AutoModelForMaskedLM.from_pretrained(model_name, from_flax=True)
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
14 |
-
tokenizer.save_pretrained('exported_pytorch_model')
|
15 |
-
model.save_pretrained('exported_pytorch_model')
|
16 |
-
nlp = pipeline('fill-mask', model=
|
17 |
|
18 |
result_sentence = nlp(masked_text)
|
19 |
|
|
|
11 |
|
12 |
model = AutoModelForMaskedLM.from_pretrained(model_name, from_flax=True)
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
14 |
+
# tokenizer.save_pretrained('exported_pytorch_model')
|
15 |
+
# model.save_pretrained('exported_pytorch_model')
|
16 |
+
nlp = pipeline('fill-mask', model=model, tokenizer=tokenizer)
|
17 |
|
18 |
result_sentence = nlp(masked_text)
|
19 |
|