Spaces:
Sleeping
Sleeping
import streamlit as st | |
import transformers | |
# use @st.cache decorator to cache model β because it is too large, we do not want to reload it every time | |
# use allow_output_mutation = True to tell streamlit that model should be treated as immutable object β singleton | |
# @st.cache(allow_output_mutation = True) | |
# load model and tokenizer | |
tokenizer = transformers.AutoTokenizer.from_pretrained("yeshpanovrustem/xlm-roberta-large-ner-kazakh") | |
model = transformers.AutoModelForTokenClassification.from_pretrained("yeshpanovrustem/xlm-roberta-large-ner-kazakh") | |
# # define function for ner | |
# st.markdown("# Hello") | |
# # st.set_page_config(page_title = "Kazakh Named Entity Recognition", page_icon = "π") | |
# # st.title("π Kazakh Named Entity Recognition") | |
# x = st.slider('Select a value') | |
# st.write(x, 'squared is', x * x) |