biosem-ner / app.py
camilothorne's picture
Minor change
25bd545
Raw
History Blame Contribute Delete
383 Bytes
import os
from huggingface_hub import login
from transformers import pipeline
from dotenv import load_dotenv
import gradio as gr
model_checkpoint = "camilothorne/distilbert-base-cased-finetuned-ner-biosem"
hf_token = os.environ['HF_TOKEN']
login(hf_token)
token_classifier = pipeline(
model=model_checkpoint,
)
gr.Interface.from_pipeline(token_classifier).launch(share=True)