Spaces:
Sleeping
Sleeping
File size: 622 Bytes
7379bd2 39cd2c1 7379bd2 39cd2c1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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}")
|