Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,12 @@ import os
|
|
2 |
import torch
|
3 |
from flair.models import SequenceTagger
|
4 |
import flair
|
|
|
|
|
5 |
|
6 |
flair.device = torch.device('cpu')
|
7 |
os.makedirs("Corpora", exist_ok=True)
|
8 |
-
flair.cache_root =
|
9 |
pos_tagger = SequenceTagger.load("qanastek/pos-french-camembert-flair")
|
10 |
del pos_tagger
|
11 |
|
|
|
2 |
import torch
|
3 |
from flair.models import SequenceTagger
|
4 |
import flair
|
5 |
+
from pathlib import Path
|
6 |
+
|
7 |
|
8 |
flair.device = torch.device('cpu')
|
9 |
os.makedirs("Corpora", exist_ok=True)
|
10 |
+
flair.cache_root = Path(f"Corpora/.flair")
|
11 |
pos_tagger = SequenceTagger.load("qanastek/pos-french-camembert-flair")
|
12 |
del pos_tagger
|
13 |
|