Spaces:
Sleeping
Sleeping
add option
Browse files
app.py
CHANGED
@@ -7,28 +7,51 @@ st.sidebar.title('Tokenizers demo')
|
|
7 |
#x = st.slider('Select a value')
|
8 |
#st.write(x, 'squared is', x * x)
|
9 |
|
10 |
-
#st.sidebar.subheader('Choose the tokenizer', divider='grey')
|
11 |
-
#option = st.sidebar.selectbox(
|
12 |
-
# 'model_name',
|
13 |
-
# ['deepseek-ai/deepseek-coder-1.3b-instruct',
|
14 |
-
# 'bigcode/starcoder'])
|
15 |
-
|
16 |
-
model_name_A = st.sidebar.text_input('Model Name A', 'deepseek-ai/deepseek-coder-1.3b-instruct')
|
17 |
-
model_name_B = st.sidebar.text_input('Model Name B', 'deepseek-ai/deepseek-coder-1.3b-instruct')
|
18 |
-
|
19 |
model_option = ['deepseek-ai/deepseek-coder-1.3b-instruct',
|
20 |
'MediaTek-Research/Breeze-7B-Instruct-64k-v0_1',
|
21 |
-
'microsoft/phi-2']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
#'Your choice:', model_name
|
29 |
|
30 |
-
st.sidebar.subheader('
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
|
34 |
col1, col2 = st.columns(2)
|
|
|
7 |
#x = st.slider('Select a value')
|
8 |
#st.write(x, 'squared is', x * x)
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
model_option = ['deepseek-ai/deepseek-coder-1.3b-instruct',
|
11 |
'MediaTek-Research/Breeze-7B-Instruct-64k-v0_1',
|
12 |
+
'microsoft/phi-2', 'bigcode/starcoder', 'enter by myself']
|
13 |
+
|
14 |
+
input_option = ['123.5', 'hello world!!!', '大雨+寒流來襲!全台極凍72小時「探5度以下', 'enter by myself']
|
15 |
+
|
16 |
+
|
17 |
+
st.sidebar.subheader('Choose the tokenizer', divider='grey')
|
18 |
+
st.sidebar.write('You can choose `enter by myself` to paste the model you want.')
|
19 |
+
model_name_A = st.sidebar.selectbox(
|
20 |
+
'Model Name A',
|
21 |
+
model_option)
|
22 |
+
|
23 |
+
|
24 |
+
if model_name_A == 'enter by myself':
|
25 |
+
model_name_A = st.sidebar.text_input('Please enter Model Name A', 'deepseek-ai/deepseek-coder-1.3b-instruct')
|
26 |
|
27 |
+
model_name_B = st.sidebar.selectbox(
|
28 |
+
'Model Name B',
|
29 |
+
model_option)
|
30 |
+
|
31 |
+
if model_name_B == 'enter by myself':
|
32 |
+
model_name_B = st.sidebar.text_input('Please enter Model Name B', 'deepseek-ai/deepseek-coder-1.3b-instruct')
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
#with st.sidebar.expander("Models that you might want"):
|
37 |
+
# for m in model_option:
|
38 |
+
# st.write(m)
|
39 |
|
40 |
|
41 |
#'Your choice:', model_name
|
42 |
|
43 |
+
st.sidebar.subheader('Choose the input sentence', divider='grey')
|
44 |
+
st.sidebar.write('You can choose `enter by myself` to enter the text you want.')
|
45 |
+
input_data = st.sidebar.selectbox(
|
46 |
+
'Input Sentence',
|
47 |
+
input_option)
|
48 |
+
|
49 |
+
if input_data == 'enter by myself':
|
50 |
+
input_data = st.sidebar.text_input('Write the Input Sentence', 'Hello sunshine!!!')
|
51 |
+
|
52 |
+
#with st.sidebar.expander("Input that you might want to test"):
|
53 |
+
# for m in input_option:
|
54 |
+
# st.write(m)
|
55 |
|
56 |
|
57 |
col1, col2 = st.columns(2)
|