Annorita's picture
rearrange
ab98424
raw
history blame
810 Bytes
import streamlit as st
from utils import get_res
st.sidebar.title('Tokenizers demo')
#x = st.slider('Select a value')
#st.write(x, 'squared is', x * x)
st.sidebar.subheader('Choose the tokenizer', divider='grey')
option = st.sidebar.selectbox(
'model_name',
['deepseek-ai/deepseek-coder-1.3b-instruct',
'bigcode/starcoder'])
model_name = st.sidebar.text_input('Model Name', 'deepseek-ai/deepseek-coder-1.3b-instruct')
#'Your choice:', model_name
st.sidebar.subheader('Write the input sentence', divider='grey')
input_data = st.sidebar.text_input('Input Sentence', 'Hello world!!!')
res = get_res(model_name=model_name, input_sentence=input_data, single_print=False)
#st.markdown('<style></style>')
st.subheader('Tokenized result', divider='grey')
st.markdown(res, unsafe_allow_html=True)