Spaces:
Build error
Build error
Create Gpu
Browse files
Gpu
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from optimum.pipelines import pipeline
|
2 |
+
from transformers import AutoTokenizer
|
3 |
+
|
4 |
+
tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased-finetuned-sst-2-english")
|
5 |
+
|
6 |
+
pipeline = pipeline(task="text-classification", model=ort_model, tokenizer=tokenizer, device="cuda:0")
|
7 |
+
result = pipeline("Both the music and visual were astounding, not to mention the actors performance.")
|