commit files to HF hub
Browse files- config.json +2 -3
- pipeline.py +2 -2
config.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
"attention_dropout": 0.0,
|
9 |
"bos_token_id": 0,
|
10 |
"custom_pipelines": {
|
11 |
-
"
|
12 |
"default": {
|
13 |
"model": {
|
14 |
"pt": [
|
@@ -21,8 +21,7 @@
|
|
21 |
"pt": [
|
22 |
"AutoModelForSeq2SeqLM"
|
23 |
],
|
24 |
-
"tf": []
|
25 |
-
"type": "text"
|
26 |
}
|
27 |
},
|
28 |
"d_model": 256,
|
|
|
8 |
"attention_dropout": 0.0,
|
9 |
"bos_token_id": 0,
|
10 |
"custom_pipelines": {
|
11 |
+
"modern_french_normalisation": {
|
12 |
"default": {
|
13 |
"model": {
|
14 |
"pt": [
|
|
|
21 |
"pt": [
|
22 |
"AutoModelForSeq2SeqLM"
|
23 |
],
|
24 |
+
"tf": []
|
|
|
25 |
}
|
26 |
},
|
27 |
"d_model": 256,
|
pipeline.py
CHANGED
@@ -69,7 +69,7 @@ def _s_to_ff(s):
|
|
69 |
return s
|
70 |
|
71 |
def _first_s_to_f(s):
|
72 |
-
s = re.sub('s' , r'f', s)
|
73 |
return s
|
74 |
|
75 |
def _last_s_to_f(s):
|
@@ -77,7 +77,7 @@ def _last_s_to_f(s):
|
|
77 |
return s
|
78 |
|
79 |
def _first_s_to_ff(s):
|
80 |
-
s = re.sub('s' , r'ff', s)
|
81 |
return s
|
82 |
|
83 |
def _last_s_to_ff(s):
|
|
|
69 |
return s
|
70 |
|
71 |
def _first_s_to_f(s):
|
72 |
+
s = re.sub('s' , r'f', s, 1)
|
73 |
return s
|
74 |
|
75 |
def _last_s_to_f(s):
|
|
|
77 |
return s
|
78 |
|
79 |
def _first_s_to_ff(s):
|
80 |
+
s = re.sub('s' , r'ff', s, 1)
|
81 |
return s
|
82 |
|
83 |
def _last_s_to_ff(s):
|