Update Space (evaluate main: cf7f9820)
Browse files- README.md +1 -1
- perplexity.py +4 -4
- requirements.txt +1 -1
README.md
CHANGED
@@ -72,7 +72,7 @@ results = perplexity.compute(model_id='gpt2',
|
|
72 |
print(list(results.keys()))
|
73 |
>>>['perplexities', 'mean_perplexity']
|
74 |
print(round(results["mean_perplexity"], 2))
|
75 |
-
>>>646.
|
76 |
print(round(results["perplexities"][0], 2))
|
77 |
>>>32.25
|
78 |
```
|
|
|
72 |
print(list(results.keys()))
|
73 |
>>>['perplexities', 'mean_perplexity']
|
74 |
print(round(results["mean_perplexity"], 2))
|
75 |
+
>>>646.75
|
76 |
print(round(results["perplexities"][0], 2))
|
77 |
>>>32.25
|
78 |
```
|
perplexity.py
CHANGED
@@ -63,10 +63,10 @@ Examples:
|
|
63 |
... data=data) # doctest:+ELLIPSIS
|
64 |
>>> print(list(results.keys()))
|
65 |
['perplexities', 'mean_perplexity']
|
66 |
-
>>> print(round(results["mean_perplexity"],
|
67 |
-
|
68 |
-
>>> print(round(results["perplexities"][0],
|
69 |
-
32.
|
70 |
|
71 |
Example 2:
|
72 |
>>> from datasets import load_dataset
|
|
|
63 |
... data=data) # doctest:+ELLIPSIS
|
64 |
>>> print(list(results.keys()))
|
65 |
['perplexities', 'mean_perplexity']
|
66 |
+
>>> print(round(results["mean_perplexity"], 0))
|
67 |
+
647.0
|
68 |
+
>>> print(round(results["perplexities"][0], 0))
|
69 |
+
32.0
|
70 |
|
71 |
Example 2:
|
72 |
>>> from datasets import load_dataset
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
git+https://github.com/huggingface/evaluate@
|
2 |
torch
|
3 |
transformers
|
|
|
1 |
+
git+https://github.com/huggingface/evaluate@cf7f98201001c9ef673c49ffbcb8439e606e06a6
|
2 |
torch
|
3 |
transformers
|