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")