File size: 810 Bytes
5ff29be
35996ec
5ff29be
ab98424
6893866
35996ec
 
96a0e76
ab98424
 
 
 
 
96a0e76
ab98424
1459d42
ab98424
1459d42
ab98424
 
35996ec
 
 
 
1c58aa1
 
ab98424
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)