Spaces:
Running
Running
Commit
·
6a9cefc
0
Parent(s):
Duplicate from mathemakitten/glue-suite-v2
Browse filesCo-authored-by: helen <mathemakitten@users.noreply.huggingface.co>
- .gitattributes +33 -0
- README.md +11 -0
- glue-suite-v2.py +137 -0
- index.html +24 -0
- style.css +28 -0
.gitattributes
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
25 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Glue Suite V2
|
3 |
+
emoji: 🐢
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: purple
|
6 |
+
sdk: static
|
7 |
+
pinned: false
|
8 |
+
duplicated_from: mathemakitten/glue-suite-v2
|
9 |
+
---
|
10 |
+
|
11 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
glue-suite-v2.py
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import evaluate
|
2 |
+
from evaluate.evaluation_suite import SubTask
|
3 |
+
|
4 |
+
|
5 |
+
class Suite(evaluate.EvaluationSuite):
|
6 |
+
|
7 |
+
def __init__(self, name):
|
8 |
+
super().__init__(name)
|
9 |
+
self.preprocessor = lambda x: {"text": x["text"].lower()}
|
10 |
+
self.suite = [
|
11 |
+
SubTask(
|
12 |
+
task_type="text-classification",
|
13 |
+
data="glue",
|
14 |
+
subset="cola",
|
15 |
+
split="test[:10]",
|
16 |
+
args_for_task={
|
17 |
+
"metric": "accuracy",
|
18 |
+
"input_column": "sentence",
|
19 |
+
"label_column": "label",
|
20 |
+
"label_mapping": {
|
21 |
+
"LABEL_0": 0.0,
|
22 |
+
"LABEL_1": 1.0
|
23 |
+
}
|
24 |
+
}
|
25 |
+
),
|
26 |
+
SubTask(
|
27 |
+
task_type="text-classification",
|
28 |
+
data="glue",
|
29 |
+
subset="sst2",
|
30 |
+
split="validation[:10]",
|
31 |
+
args_for_task={
|
32 |
+
"metric": "accuracy",
|
33 |
+
"input_column": "sentence",
|
34 |
+
"label_column": "label",
|
35 |
+
"label_mapping": {
|
36 |
+
"LABEL_0": 0.0,
|
37 |
+
"LABEL_1": 1.0
|
38 |
+
}
|
39 |
+
}
|
40 |
+
),
|
41 |
+
SubTask(
|
42 |
+
task_type="text-classification",
|
43 |
+
data="glue",
|
44 |
+
subset="qqp",
|
45 |
+
split="validation[:10]",
|
46 |
+
args_for_task={
|
47 |
+
"metric": "accuracy",
|
48 |
+
"input_column": "question1",
|
49 |
+
"second_input_column": "question2",
|
50 |
+
"label_column": "label",
|
51 |
+
"label_mapping": {
|
52 |
+
"LABEL_0": 0,
|
53 |
+
"LABEL_1": 1
|
54 |
+
}
|
55 |
+
}
|
56 |
+
),
|
57 |
+
SubTask(
|
58 |
+
task_type="text-classification",
|
59 |
+
data="glue",
|
60 |
+
subset="mrpc",
|
61 |
+
split="validation[:10]",
|
62 |
+
args_for_task={
|
63 |
+
"metric": "accuracy",
|
64 |
+
"input_column": "sentence1",
|
65 |
+
"second_input_column": "sentence2",
|
66 |
+
"label_column": "label",
|
67 |
+
"label_mapping": {
|
68 |
+
"LABEL_0": 0,
|
69 |
+
"LABEL_1": 1
|
70 |
+
}
|
71 |
+
}
|
72 |
+
),
|
73 |
+
SubTask(
|
74 |
+
task_type="text-classification",
|
75 |
+
data="glue",
|
76 |
+
subset="mnli",
|
77 |
+
split="validation_mismatched[:10]",
|
78 |
+
args_for_task={
|
79 |
+
"metric": "accuracy",
|
80 |
+
"input_column": "premise",
|
81 |
+
"second_input_column": "hypothesis",
|
82 |
+
"label_mapping": {
|
83 |
+
"LABEL_0": 0,
|
84 |
+
"LABEL_1": 1,
|
85 |
+
"LABEL_2": 2
|
86 |
+
}
|
87 |
+
}
|
88 |
+
),
|
89 |
+
SubTask(
|
90 |
+
task_type="text-classification",
|
91 |
+
data="glue",
|
92 |
+
subset="qnli",
|
93 |
+
split="validation[:10]",
|
94 |
+
args_for_task={
|
95 |
+
"metric": "accuracy",
|
96 |
+
"input_column": "question",
|
97 |
+
"second_input_column": "sentence",
|
98 |
+
"label_column": "label",
|
99 |
+
"label_mapping": {
|
100 |
+
"LABEL_0": 0,
|
101 |
+
"LABEL_1": 1
|
102 |
+
}
|
103 |
+
}
|
104 |
+
),
|
105 |
+
SubTask(
|
106 |
+
task_type="text-classification",
|
107 |
+
data="glue",
|
108 |
+
subset="rte",
|
109 |
+
split="validation[:10]",
|
110 |
+
args_for_task={
|
111 |
+
"metric": "accuracy",
|
112 |
+
"input_column": "sentence1",
|
113 |
+
"second_input_column": "sentence2",
|
114 |
+
"label_column": "label",
|
115 |
+
"label_mapping": {
|
116 |
+
"LABEL_0": 0,
|
117 |
+
"LABEL_1": 1
|
118 |
+
}
|
119 |
+
}
|
120 |
+
),
|
121 |
+
SubTask(
|
122 |
+
task_type="text-classification",
|
123 |
+
data="glue",
|
124 |
+
subset="wnli",
|
125 |
+
split="validation[:10]",
|
126 |
+
args_for_task={
|
127 |
+
"metric": "accuracy",
|
128 |
+
"input_column": "sentence1",
|
129 |
+
"second_input_column": "sentence2",
|
130 |
+
"label_column": "label",
|
131 |
+
"label_mapping": {
|
132 |
+
"LABEL_0": 0,
|
133 |
+
"LABEL_1": 1
|
134 |
+
}
|
135 |
+
}
|
136 |
+
)
|
137 |
+
]
|
index.html
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta charset="utf-8" />
|
5 |
+
<meta name="viewport" content="width=device-width" />
|
6 |
+
<title>My static Space</title>
|
7 |
+
<link rel="stylesheet" href="style.css" />
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<div class="card">
|
11 |
+
<h1>Welcome to your static Space!</h1>
|
12 |
+
<p>
|
13 |
+
You can modify this app directly by editing <i>index.html</i> in the
|
14 |
+
Files and versions tab.
|
15 |
+
</p>
|
16 |
+
<p>
|
17 |
+
Also don't forget to check the
|
18 |
+
<a href="https://huggingface.co/docs/hub/spaces" target="_blank"
|
19 |
+
>Spaces documentation</a
|
20 |
+
>.
|
21 |
+
</p>
|
22 |
+
</div>
|
23 |
+
</body>
|
24 |
+
</html>
|
style.css
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
padding: 2rem;
|
3 |
+
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
4 |
+
}
|
5 |
+
|
6 |
+
h1 {
|
7 |
+
font-size: 16px;
|
8 |
+
margin-top: 0;
|
9 |
+
}
|
10 |
+
|
11 |
+
p {
|
12 |
+
color: rgb(107, 114, 128);
|
13 |
+
font-size: 15px;
|
14 |
+
margin-bottom: 10px;
|
15 |
+
margin-top: 5px;
|
16 |
+
}
|
17 |
+
|
18 |
+
.card {
|
19 |
+
max-width: 620px;
|
20 |
+
margin: 0 auto;
|
21 |
+
padding: 16px;
|
22 |
+
border: 1px solid lightgray;
|
23 |
+
border-radius: 16px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.card p:last-child {
|
27 |
+
margin-bottom: 0;
|
28 |
+
}
|