Skip to content

Instantly share code, notes, and snippets.

@kaustumbh7
Created June 20, 2019 17:48
Show Gist options
  • Save kaustumbh7/06428061f624f408587c8f49d7a63fc7 to your computer and use it in GitHub Desktop.
Save kaustumbh7/06428061f624f408587c8f49d7a63fc7 to your computer and use it in GitHub Desktop.
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)
@rcl-satyammishra
Copy link

what is this Path for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment