Spaces:
Running
Running
meteor
#3
by
awais126
- opened
- README.md +1 -1
- meteor.py +1 -7
- requirements.txt +1 -1
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🤗
|
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
tags:
|
|
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.0.2
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
tags:
|
meteor.py
CHANGED
@@ -15,18 +15,12 @@
|
|
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
|
|
|
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
|
requirements.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
git+https://github.com/huggingface/evaluate@
|
2 |
nltk
|
|
|
1 |
+
git+https://github.com/huggingface/evaluate@940d6dee3b4a23eabb0c81e4117c9533cd7c458a
|
2 |
nltk
|