Spaces:
Paused
Paused
DHRUV SHEKHAWAT
commited on
Commit
·
5d17a8c
1
Parent(s):
896bfe3
Update app.py
Browse files
app.py
CHANGED
@@ -104,9 +104,9 @@ text2 = st.text_input('Enter word: ') #text is stored in this variable
|
|
104 |
if option == '13M_OLD':
|
105 |
option2 = st.selectbox('Type',('word','sentence'))
|
106 |
if option2 == 'word':
|
107 |
-
|
108 |
else:
|
109 |
-
|
110 |
vocab_size = 100000
|
111 |
max_len = 1
|
112 |
d_model = 64 # 64 , 1024
|
@@ -116,7 +116,7 @@ if option == '13M_OLD':
|
|
116 |
weights = "predict3"
|
117 |
datafile = "data2.txt"
|
118 |
dict = "dict_predict3.bin.npz"
|
119 |
-
out2 = completion_model(vocab_size, max_len, d_model, n_head, ff_dim, dropout_rate,weights,datafile,dict,
|
120 |
st.write("Predicted Text: ")
|
121 |
st.write(out2)
|
122 |
|
@@ -124,9 +124,9 @@ if option == '13M_OLD':
|
|
124 |
elif option=="26M_OLD":
|
125 |
option2 = st.selectbox('Type',('word','sentence'))
|
126 |
if option2 == 'word':
|
127 |
-
|
128 |
else:
|
129 |
-
|
130 |
vocab_size = 100000
|
131 |
max_len = 1
|
132 |
d_model = 128 # 64 , 1024
|
@@ -136,7 +136,7 @@ elif option=="26M_OLD":
|
|
136 |
weights = "predict1"
|
137 |
datafile = "data2.txt"
|
138 |
dict = "dict_predict1.bin.npz"
|
139 |
-
out2 = completion_model(vocab_size, max_len, d_model, n_head, ff_dim, dropout_rate,weights,datafile,dict,
|
140 |
st.write("Predicted Text: ")
|
141 |
st.write(out2)
|
142 |
else:
|
|
|
104 |
if option == '13M_OLD':
|
105 |
option2 = st.selectbox('Type',('word','sentence'))
|
106 |
if option2 == 'word':
|
107 |
+
len2 = 1
|
108 |
else:
|
109 |
+
len2 = 13
|
110 |
vocab_size = 100000
|
111 |
max_len = 1
|
112 |
d_model = 64 # 64 , 1024
|
|
|
116 |
weights = "predict3"
|
117 |
datafile = "data2.txt"
|
118 |
dict = "dict_predict3.bin.npz"
|
119 |
+
out2 = completion_model(vocab_size, max_len, d_model, n_head, ff_dim, dropout_rate,weights,datafile,dict,len2,text2)
|
120 |
st.write("Predicted Text: ")
|
121 |
st.write(out2)
|
122 |
|
|
|
124 |
elif option=="26M_OLD":
|
125 |
option2 = st.selectbox('Type',('word','sentence'))
|
126 |
if option2 == 'word':
|
127 |
+
len2 = 1
|
128 |
else:
|
129 |
+
len2 = 13
|
130 |
vocab_size = 100000
|
131 |
max_len = 1
|
132 |
d_model = 128 # 64 , 1024
|
|
|
136 |
weights = "predict1"
|
137 |
datafile = "data2.txt"
|
138 |
dict = "dict_predict1.bin.npz"
|
139 |
+
out2 = completion_model(vocab_size, max_len, d_model, n_head, ff_dim, dropout_rate,weights,datafile,dict,len2,text2)
|
140 |
st.write("Predicted Text: ")
|
141 |
st.write(out2)
|
142 |
else:
|