File size: 600 Bytes
709586b
d38baa2
43f0a0e
 
d89508e
 
43f0a0e
 
427820b
822c0bd
43f0a0e
 
709586b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import torch
from flair.models import SequenceTagger
import flair
from pathlib import Path


flair.device = torch.device('cpu')
os.makedirs("Corpora/.flair/models/pos-french-camembert-flair", exist_ok=True)
flair.cache_root = Path(f"./Corpora/.flair")
pos_tagger = SequenceTagger.load("qanastek/pos-french-camembert-flair")
del pos_tagger

os.system("git clone --branch v2.b https://github.com/DigitalPhonetics/IMS-Toucan.git toucan_codebase")
os.system("mv toucan_codebase/* .")

from run_model_downloader import download_models
from demo import Demo

download_models()
Demo(gpu_id="cpu")