Ilvir commited on
Commit
d789774
1 Parent(s): 18f8ce4

Update pages/gpt.py

Browse files
Files changed (1) hide show
  1. pages/gpt.py +34 -34
pages/gpt.py CHANGED
@@ -4,46 +4,46 @@ import torch
4
  import textwrap
5
  import plotly.express as px
6
 
7
- df = px.data.iris()
8
 
9
- @st.cache_data
10
- def get_img_as_base64(file):
11
- with open(file, "rb") as f:
12
- data = f.read()
13
- return base64.b64encode(data).decode()
14
 
15
- page_bg_img = f"""
16
- <style>
17
- [data-testid="stAppViewContainer"] > .main {{
18
- background-image: url("https://i.pinimg.com/originals/9f/57/bd/9f57bd45d33eb906fdb3d7ffe22e2058.png");
19
- background-size: 100%;
20
- background-position: top left;
21
- background-repeat: no-repeat;
22
- background-attachment: local;
23
- }}
24
- # [data-testid="stSidebar"] > div:first-child {{
25
- # background-image: url("https://catherineasquithgallery.com/uploads/posts/2021-02/1614542041_37-p-fon-belii-tekstura-43.jpg");
26
  # background-size: 100%;
27
- # background-position: center;
28
  # background-repeat: no-repeat;
29
- # background-attachment: fixed;
30
  # }}
31
- [data-testid="stHeader"] {{
32
- background: rgba(0,0,0,0);
33
- }}
34
- [data-testid="stToolbar"] {{
35
- right: 2rem;
36
- }}
37
- div.css-1n76uvr.esravye0 {{
38
- background-color: rgba(238, 238, 238, 0.5);
39
- border: 10px solid #EEEEEE;
40
- padding: 5% 5% 5% 10%;
41
- border-radius: 5px;
42
- }}
43
- </style>
44
- """
 
 
 
 
 
 
 
45
 
46
- st.markdown(page_bg_img, unsafe_allow_html=True)
47
 
48
  st.markdown('## Генерация текста GPT-моделью')
49
 
 
4
  import textwrap
5
  import plotly.express as px
6
 
7
+ # df = px.data.iris()
8
 
9
+ # @st.cache_data
10
+ # def get_img_as_base64(file):
11
+ # with open(file, "rb") as f:
12
+ # data = f.read()
13
+ # return base64.b64encode(data).decode()
14
 
15
+ # page_bg_img = f"""
16
+ # <style>
17
+ # [data-testid="stAppViewContainer"] > .main {{
18
+ # background-image: url("https://i.pinimg.com/originals/9f/57/bd/9f57bd45d33eb906fdb3d7ffe22e2058.png");
 
 
 
 
 
 
 
19
  # background-size: 100%;
20
+ # background-position: top left;
21
  # background-repeat: no-repeat;
22
+ # background-attachment: local;
23
  # }}
24
+ # # [data-testid="stSidebar"] > div:first-child {{
25
+ # # background-image: url("https://catherineasquithgallery.com/uploads/posts/2021-02/1614542041_37-p-fon-belii-tekstura-43.jpg");
26
+ # # background-size: 100%;
27
+ # # background-position: center;
28
+ # # background-repeat: no-repeat;
29
+ # # background-attachment: fixed;
30
+ # # }}
31
+ # [data-testid="stHeader"] {{
32
+ # background: rgba(0,0,0,0);
33
+ # }}
34
+ # [data-testid="stToolbar"] {{
35
+ # right: 2rem;
36
+ # }}
37
+ # div.css-1n76uvr.esravye0 {{
38
+ # background-color: rgba(238, 238, 238, 0.5);
39
+ # border: 10px solid #EEEEEE;
40
+ # padding: 5% 5% 5% 10%;
41
+ # border-radius: 5px;
42
+ # }}
43
+ # </style>
44
+ # """
45
 
46
+ # st.markdown(page_bg_img, unsafe_allow_html=True)
47
 
48
  st.markdown('## Генерация текста GPT-моделью')
49