Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
os.system("git clone --branch v2.b https://github.com/DigitalPhonetics/IMS-Toucan.git toucan_codebase")
|
4 |
os.system("mv toucan_codebase/* .")
|
|
|
1 |
import os
|
2 |
+
from flair.models import SequenceTagger
|
3 |
+
import flair
|
4 |
+
|
5 |
+
flair.device = torch.device('cpu')
|
6 |
+
os.makedirs("Corpora", exist_ok=True)
|
7 |
+
flair.cache_root = Path(f"Corpora/.flair")
|
8 |
+
pos_tagger = SequenceTagger.load("qanastek/pos-french-camembert-flair")
|
9 |
+
del pos_tagger
|
10 |
|
11 |
os.system("git clone --branch v2.b https://github.com/DigitalPhonetics/IMS-Toucan.git toucan_codebase")
|
12 |
os.system("mv toucan_codebase/* .")
|