Created
June 20, 2019 17:48
-
-
Save kaustumbh7/63223c73f59d1380402b74e9e44e1450 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.apps import AppConfig | |
import html | |
import pathlib | |
import os | |
from fast_bert.prediction import BertClassificationPredictor | |
class WebappConfig(AppConfig): | |
name = 'fastbert' | |
MODEL_PATH = Path("model") | |
BERT_PRETRAINED_PATH = Path("model/uncased_L-12_H-768_A-12/") | |
LABEL_PATH = Path("label/") | |
predictor = BertClassificationPredictor(model_path = MODEL_PATH/"multilabel-emotion-fastbert-basic.bin", | |
pretrained_path = BERT_PRETRAINED_PATH, | |
label_path = LABEL_PATH, multi_label=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment