Spaces:
Runtime error
Runtime error
Commit
·
528cfd8
1
Parent(s):
881f140
Update pages/gpt_v1.py
Browse files- pages/gpt_v1.py +26 -0
pages/gpt_v1.py
CHANGED
@@ -4,6 +4,32 @@ import torch
|
|
4 |
import textwrap
|
5 |
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
st.markdown('## Генерация текста GPT-моделью')
|
8 |
|
9 |
tokenizer = GPT2Tokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')
|
|
|
4 |
import textwrap
|
5 |
|
6 |
|
7 |
+
<div class="animated-bg"></div>
|
8 |
+
.animated-bg {
|
9 |
+
position: fixed;
|
10 |
+
top: 0;
|
11 |
+
left: 0;
|
12 |
+
width: 100%;
|
13 |
+
height: 100%;
|
14 |
+
z-index: -1;
|
15 |
+
background: linear-gradient(to right, #ff416c, #ff4b2b);
|
16 |
+
animation: animate-bg 10s linear infinite;
|
17 |
+
}
|
18 |
+
|
19 |
+
@keyframes animate-bg {
|
20 |
+
0% {
|
21 |
+
background-position: 0% 50%;
|
22 |
+
}
|
23 |
+
50% {
|
24 |
+
background-position: 100% 50%;
|
25 |
+
}
|
26 |
+
100% {
|
27 |
+
background-position: 0% 50%;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
st.markdown('## Генерация текста GPT-моделью')
|
34 |
|
35 |
tokenizer = GPT2Tokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')
|