Spaces:
Runtime error
Runtime error
Rzhishchev
commited on
Commit
•
24bf839
1
Parent(s):
1d81050
Update gpt2.py
Browse files
gpt2.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
|
5 |
|
6 |
def app(): # Инкапсулирующая функция
|
7 |
-
st.title("GPT-2
|
8 |
|
9 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
10 |
|
@@ -29,7 +29,7 @@ def app(): # Инкапсулирующая функция
|
|
29 |
return tokenizer.decode(out[0], skip_special_tokens=True)
|
30 |
|
31 |
|
32 |
-
user_input = st.text_area("Input Text", "
|
33 |
|
34 |
# Add sliders or input boxes for model parameters
|
35 |
num_beams = st.slider("Number of Beams", min_value=1, max_value=20, value=10)
|
|
|
4 |
|
5 |
|
6 |
def app(): # Инкапсулирующая функция
|
7 |
+
st.title("GPT-2 Generator")
|
8 |
|
9 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
10 |
|
|
|
29 |
return tokenizer.decode(out[0], skip_special_tokens=True)
|
30 |
|
31 |
|
32 |
+
user_input = st.text_area("Input Text", "Ладно Павел, спасибо за поддержку!")
|
33 |
|
34 |
# Add sliders or input boxes for model parameters
|
35 |
num_beams = st.slider("Number of Beams", min_value=1, max_value=20, value=10)
|