Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
64dfd17
1
Parent(s):
6063af2
Trying to use ONNX model.
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ app.add_middleware(
|
|
| 20 |
|
| 21 |
model_name = "xenova/mobilebert-uncased-mnli"
|
| 22 |
model = ORTModelForQuestionAnswering.from_pretrained(model_name, file_name="onnx/model.onnx")
|
| 23 |
-
tokenizer = AutoTokenizer.from_pretrained("typeform/mobilebert-uncased-mnli")
|
| 24 |
|
| 25 |
# file = cached_download("https://huggingface.co/" + model_name + "")
|
| 26 |
# sess = InferenceSession(file)
|
|
|
|
| 20 |
|
| 21 |
model_name = "xenova/mobilebert-uncased-mnli"
|
| 22 |
model = ORTModelForQuestionAnswering.from_pretrained(model_name, file_name="onnx/model.onnx")
|
| 23 |
+
tokenizer = AutoTokenizer.from_pretrained("typeform/mobilebert-uncased-mnli", model_max_length=512)
|
| 24 |
|
| 25 |
# file = cached_download("https://huggingface.co/" + model_name + "")
|
| 26 |
# sess = InferenceSession(file)
|