Skip to content

Commit

Permalink
Add example code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansterteddy committed Oct 15, 2021
1 parent f8537f7 commit 790080f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions onnxruntime/ort_ext/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import numpy as np
from onnxruntime_extensions import PyOrtFunction

encode = PyOrtFunction.from_model("gpt2_tok.onnx")

input_text = ["Hello, World!", "Bye, World!"]
res_1, res_2 = encode(input_text)
print(res_1)
print(res_2)

0 comments on commit 790080f

Please sign in to comment.