alekeik1's picture
feat(main): split into files
39cd2c1
raw
history blame
622 Bytes
import streamlit as st
from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("Davlan/distilbert-base-multilingual-cased-ner-hrl")
model = AutoModelForTokenClassification.from_pretrained("Davlan/distilbert-base-multilingual-cased-ner-hrl")
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
st.markdown("### Hello there")
st.markdown("<img width=200px src='https://rozetked.me/images/uploads/dwoilp3BVjlE.jpg'>", unsafe_allow_html=True)
text = st.text_area("TEXT HERE")
raw_predictions = nlp("is this real?")
st.markdown(f"{raw_predictions}")