lvwerra HF staff commited on
Commit
7615696
1 Parent(s): 74795be

Update Space (evaluate main: 50512323)

Browse files
Files changed (3) hide show
  1. README.md +3 -3
  2. app.py +1 -1
  3. word_length.py +2 -2
README.md CHANGED
@@ -25,7 +25,7 @@ This measurement requires a list of strings as input:
25
 
26
  ```python
27
  >>> data = ["hello world"]
28
- >>> wordlength = evaluate.load("word_length", type="measurement")
29
  >>> results = wordlength.compute(data=data)
30
  ```
31
 
@@ -50,7 +50,7 @@ Example for a single string
50
 
51
  ```python
52
  >>> data = ["hello sun and goodbye moon"]
53
- >>> wordlength = evaluate.load("word_length", type="measurement")
54
  >>> results = wordlength.compute(data=data)
55
  >>> print(results)
56
  {'average_length': 5}
@@ -59,7 +59,7 @@ Example for a single string
59
  Example for a multiple strings
60
  ```python
61
  >>> data = ["hello sun and goodbye moon", "foo bar foo bar"]
62
- >>> wordlength = evaluate.load("word_length", type="measurement")
63
  >>> results = wordlength.compute(data=text)
64
  {'average_length': 4.5}
65
  ```
 
25
 
26
  ```python
27
  >>> data = ["hello world"]
28
+ >>> wordlength = evaluate.load("word_length", module_type="measurement")
29
  >>> results = wordlength.compute(data=data)
30
  ```
31
 
 
50
 
51
  ```python
52
  >>> data = ["hello sun and goodbye moon"]
53
+ >>> wordlength = evaluate.load("word_length", module_type="measurement")
54
  >>> results = wordlength.compute(data=data)
55
  >>> print(results)
56
  {'average_length': 5}
 
59
  Example for a multiple strings
60
  ```python
61
  >>> data = ["hello sun and goodbye moon", "foo bar foo bar"]
62
+ >>> wordlength = evaluate.load("word_length", module_type="measurement")
63
  >>> results = wordlength.compute(data=text)
64
  {'average_length': 4.5}
65
  ```
app.py CHANGED
@@ -2,5 +2,5 @@ import evaluate
2
  from evaluate.utils import launch_gradio_widget
3
 
4
 
5
- module = evaluate.load("word_length", type="measurement")
6
  launch_gradio_widget(module)
 
2
  from evaluate.utils import launch_gradio_widget
3
 
4
 
5
+ module = evaluate.load("word_length", module_type="measurement")
6
  launch_gradio_widget(module)
word_length.py CHANGED
@@ -34,7 +34,7 @@ Returns:
34
 
35
  Examples:
36
  >>> data = ["hello world"]
37
- >>> wordlength = evaluate.load("word_length", type="measurement")
38
  >>> results = wordlength.compute(data=data)
39
  >>> print(results)
40
  {'average_word_length': 2}
@@ -57,7 +57,7 @@ class WordLength(evaluate.EvaluationModule):
57
  # TODO: Specifies the evaluate.EvaluationModuleInfo object
58
  return evaluate.EvaluationModuleInfo(
59
  # This is the description that will appear on the modules page.
60
- type="measurement",
61
  description=_DESCRIPTION,
62
  citation=_CITATION,
63
  inputs_description=_KWARGS_DESCRIPTION,
 
34
 
35
  Examples:
36
  >>> data = ["hello world"]
37
+ >>> wordlength = evaluate.load("word_length", module_type="measurement")
38
  >>> results = wordlength.compute(data=data)
39
  >>> print(results)
40
  {'average_word_length': 2}
 
57
  # TODO: Specifies the evaluate.EvaluationModuleInfo object
58
  return evaluate.EvaluationModuleInfo(
59
  # This is the description that will appear on the modules page.
60
+ module_type="measurement",
61
  description=_DESCRIPTION,
62
  citation=_CITATION,
63
  inputs_description=_KWARGS_DESCRIPTION,