Spaces:
Sleeping
Sleeping
teting
Browse files- pages/gpt.py +1 -2
pages/gpt.py
CHANGED
@@ -19,10 +19,9 @@ beams = st.slider('Выберите число генераций',min_value=1,
|
|
19 |
|
20 |
|
21 |
p = st.slider('Выберите значения top_p',min_value=0.5, max_value=0.9, step=0.1 )
|
22 |
-
|
23 |
if text:
|
24 |
input_ids = tokenizer.encode(text, return_tensors="pt").to('cpu')
|
25 |
-
model.eval()
|
26 |
with torch.no_grad():
|
27 |
out = model.generate(input_ids,
|
28 |
do_sample=True,
|
|
|
19 |
|
20 |
|
21 |
p = st.slider('Выберите значения top_p',min_value=0.5, max_value=0.9, step=0.1 )
|
22 |
+
model.eval()
|
23 |
if text:
|
24 |
input_ids = tokenizer.encode(text, return_tensors="pt").to('cpu')
|
|
|
25 |
with torch.no_grad():
|
26 |
out = model.generate(input_ids,
|
27 |
do_sample=True,
|