Spaces:
Runtime error
Runtime error
Commit
·
01c6d9c
1
Parent(s):
7b22434
add-ov-model (#1)
Browse files- Load openvino model without exporting it (bb5ccb48d809daf0e659a1ca5f181c4c04073db0)
Co-authored-by: Ella Charlaix <[email protected]>
app.py
CHANGED
@@ -7,9 +7,7 @@ model_id = "juliensimon/xlm-v-base-language-id"
|
|
7 |
|
8 |
p = pipeline("text-classification", model=model_id)
|
9 |
|
10 |
-
ov_model = OVModelForSequenceClassification.from_pretrained(
|
11 |
-
model_id, from_transformers=True
|
12 |
-
)
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
14 |
|
15 |
ov_p = pipeline("text-classification", model=ov_model, tokenizer=tokenizer)
|
|
|
7 |
|
8 |
p = pipeline("text-classification", model=model_id)
|
9 |
|
10 |
+
ov_model = OVModelForSequenceClassification.from_pretrained(model_id)
|
|
|
|
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
12 |
|
13 |
ov_p = pipeline("text-classification", model=ov_model, tokenizer=tokenizer)
|