Delete infer.py
Browse files
infer.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
"""
|
| 2 |
-
This code a slight modification of perplexity by hugging face
|
| 3 |
-
https://huggingface.co/docs/transformers/perplexity
|
| 4 |
-
|
| 5 |
-
Both this code and the orignal code are published under the MIT license.
|
| 6 |
-
|
| 7 |
-
by Burhan Ul tayyab and Nicholas Chua
|
| 8 |
-
"""
|
| 9 |
-
|
| 10 |
-
from model import GPT2PPL
|
| 11 |
-
|
| 12 |
-
# initialize the model
|
| 13 |
-
model = GPT2PPL()
|
| 14 |
-
|
| 15 |
-
sentence = "your text here"
|
| 16 |
-
|
| 17 |
-
model(sentence)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|