Spaces:
Running
Running
Update Space (evaluate main: cf7f9820)
Browse files- README.md +1 -1
- perplexity.py +4 -4
- requirements.txt +1 -1
README.md
CHANGED
@@ -73,7 +73,7 @@ results = perplexity.compute(model_id='gpt2',
|
|
73 |
print(list(results.keys()))
|
74 |
>>>['perplexities', 'mean_perplexity']
|
75 |
print(round(results["mean_perplexity"], 2))
|
76 |
-
>>>646.
|
77 |
print(round(results["perplexities"][0], 2))
|
78 |
>>>32.25
|
79 |
```
|
|
|
73 |
print(list(results.keys()))
|
74 |
>>>['perplexities', 'mean_perplexity']
|
75 |
print(round(results["mean_perplexity"], 2))
|
76 |
+
>>>646.75
|
77 |
print(round(results["perplexities"][0], 2))
|
78 |
>>>32.25
|
79 |
```
|
perplexity.py
CHANGED
@@ -63,10 +63,10 @@ Examples:
|
|
63 |
... predictions=input_texts) # 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 |
-
|
70 |
|
71 |
Example 2:
|
72 |
>>> from datasets import load_dataset
|
|
|
63 |
... predictions=input_texts) # 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,4 +1,4 @@
|
|
1 |
-
git+https://github.com/huggingface/evaluate@
|
2 |
torch
|
3 |
torch
|
4 |
transformers
|
|
|
1 |
+
git+https://github.com/huggingface/evaluate@cf7f98201001c9ef673c49ffbcb8439e606e06a6
|
2 |
torch
|
3 |
torch
|
4 |
transformers
|