onnx-base / src /demo.py
m3's picture
feat: stable releases
22fe4c5
raw
history blame
273 Bytes
import torch
import pipeline
from transformers import pipeline
pipe = pipeline(
task='onnx-base',
model='m3/onnx-base',
batch_size=10,
device='cpu',
)
input = torch.tensor([[1, 2], [3, 4]], dtype=torch.float32).numpy()
result = pipe(input)
print(result)