Spaces:
Runtime error
Runtime error
michalilski
commited on
Commit
·
9388f53
1
Parent(s):
55ec42e
t5 + flant5
Browse files
models.py
CHANGED
@@ -8,12 +8,12 @@ auth_token = os.environ.get("CLARIN_KNEXT")
|
|
8 |
|
9 |
DEFAULT_INPUTS: Dict[str, str] = {
|
10 |
"polish": (
|
11 |
-
"[U] Chciałbym zarezerwować stolik na 4 osoby na piątek o godzinie 18
|
12 |
"[Dziedzina] Restauracje: Popularna usługa wyszukiwania i rezerwacji restauracji "
|
13 |
"[Atrybut] Czas: Wstępny czas rezerwacji restauracji"
|
14 |
),
|
15 |
"english": (
|
16 |
-
"[U] I want to book a table for 4 people on Friday, 6
|
17 |
"[Domain] Restaurants: A popular restaurant search and reservation service "
|
18 |
"[Slot] Time: Tentative time of restaurant reservation"
|
19 |
),
|
@@ -30,6 +30,26 @@ MODELS: Dict[str, Dict[str, Any]] = {
|
|
30 |
"tokenizer": T5Tokenizer.from_pretrained("clarin-knext/plt5-base-dst", use_auth_token=auth_token),
|
31 |
"default_input": DEFAULT_INPUTS["polish"],
|
32 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
PIPELINES: Dict[str, Pipeline] = {
|
|
|
8 |
|
9 |
DEFAULT_INPUTS: Dict[str, str] = {
|
10 |
"polish": (
|
11 |
+
"[U] Chciałbym zarezerwować stolik na 4 osoby na piątek o godzinie 18:30. "
|
12 |
"[Dziedzina] Restauracje: Popularna usługa wyszukiwania i rezerwacji restauracji "
|
13 |
"[Atrybut] Czas: Wstępny czas rezerwacji restauracji"
|
14 |
),
|
15 |
"english": (
|
16 |
+
"[U] I want to book a table for 4 people on Friday, 6:30 pm. "
|
17 |
"[Domain] Restaurants: A popular restaurant search and reservation service "
|
18 |
"[Slot] Time: Tentative time of restaurant reservation"
|
19 |
),
|
|
|
30 |
"tokenizer": T5Tokenizer.from_pretrained("clarin-knext/plt5-base-dst", use_auth_token=auth_token),
|
31 |
"default_input": DEFAULT_INPUTS["polish"],
|
32 |
},
|
33 |
+
"t5-small": {
|
34 |
+
"model": T5ForConditionalGeneration.from_pretrained("clarin-knext/t5-small-dst", use_auth_token=auth_token),
|
35 |
+
"tokenizer": T5Tokenizer.from_pretrained("clarin-knext/t5-small-dst", use_auth_token=auth_token),
|
36 |
+
"default_input": DEFAULT_INPUTS["english"],
|
37 |
+
},
|
38 |
+
"t5-base": {
|
39 |
+
"model": T5ForConditionalGeneration.from_pretrained("clarin-knext/t5-base-dst", use_auth_token=auth_token),
|
40 |
+
"tokenizer": T5Tokenizer.from_pretrained("clarin-knext/t5-base-dst", use_auth_token=auth_token),
|
41 |
+
"default_input": DEFAULT_INPUTS["english"],
|
42 |
+
},
|
43 |
+
"flant5-small": {
|
44 |
+
"model": T5ForConditionalGeneration.from_pretrained("clarin-knext/flant5-small-dst", use_auth_token=auth_token),
|
45 |
+
"tokenizer": T5Tokenizer.from_pretrained("clarin-knext/flant5-small-dst", use_auth_token=auth_token),
|
46 |
+
"default_input": DEFAULT_INPUTS["polish"],
|
47 |
+
},
|
48 |
+
"flant5-base": {
|
49 |
+
"model": T5ForConditionalGeneration.from_pretrained("clarin-knext/flant5-base-dst", use_auth_token=auth_token),
|
50 |
+
"tokenizer": T5Tokenizer.from_pretrained("clarin-knext/flant5-base-dst", use_auth_token=auth_token),
|
51 |
+
"default_input": DEFAULT_INPUTS["polish"],
|
52 |
+
},
|
53 |
}
|
54 |
|
55 |
PIPELINES: Dict[str, Pipeline] = {
|