lvwerra HF staff commited on
Commit
7cddc19
1 Parent(s): bf9bfc0

Update Space (evaluate main: cf7f9820)

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. perplexity.py +4 -4
  3. 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.74
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"], 2))
67
- 78.22
68
- >>> print(round(results["perplexities"][0], 2))
69
- 11.11
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@4487d9d1e65216a36b4aa94e3396a570f44a1525
2
  torch
3
  torch
4
  transformers
 
1
+ git+https://github.com/huggingface/evaluate@cf7f98201001c9ef673c49ffbcb8439e606e06a6
2
  torch
3
  torch
4
  transformers