evaluate-bot commited on
Commit
4e1f99b
1 Parent(s): 0193ae2

Update Space (evaluate main: 775555d8)

Browse files
Files changed (2) hide show
  1. meteor.py +7 -1
  2. requirements.txt +1 -1
meteor.py CHANGED
@@ -15,12 +15,18 @@
15
 
16
  import datasets
17
  import numpy as np
18
- from datasets.config import importlib_metadata, version
19
  from nltk.translate import meteor_score
 
20
 
21
  import evaluate
22
 
23
 
 
 
 
 
 
 
24
  NLTK_VERSION = version.parse(importlib_metadata.version("nltk"))
25
  if NLTK_VERSION >= version.Version("3.6.4"):
26
  from nltk import word_tokenize
 
15
 
16
  import datasets
17
  import numpy as np
 
18
  from nltk.translate import meteor_score
19
+ from packaging import version
20
 
21
  import evaluate
22
 
23
 
24
+ if evaluate.config.PY_VERSION < version.parse("3.8"):
25
+ import importlib_metadata
26
+ else:
27
+ import importlib.metadata as importlib_metadata
28
+
29
+
30
  NLTK_VERSION = version.parse(importlib_metadata.version("nltk"))
31
  if NLTK_VERSION >= version.Version("3.6.4"):
32
  from nltk import word_tokenize
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- git+https://github.com/huggingface/evaluate@af3c30561d840b83e54fc5f7150ea58046d6af69
2
  nltk
 
1
+ git+https://github.com/huggingface/evaluate@775555d80af30d83dc6e9f42051840d29a34f31b
2
  nltk