Spaces:
Running
Running
Upload 9 files (#1)
Browse files- Upload 9 files (d3bcb7a584d8a1fd11d5012d7c1f0014a75e221e)
Co-authored-by: Maria <MARI-posa@users.noreply.huggingface.co>
- main.py +58 -0
- pages/.ipynb_checkpoints/Без названия-checkpoint.ipynb +6 -0
- pages/.ipynb_checkpoints/✨first-checkpoint.py +112 -0
- pages/.ipynb_checkpoints/✨second-checkpoint.py +112 -0
- pages/.ipynb_checkpoints/✨third-checkpoint.py +114 -0
- pages/Без названия.ipynb +326 -0
- pages/✨first.py +112 -0
- pages/✨second.py +112 -0
- pages/✨third.py +114 -0
main.py
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.set_page_config(layout="wide")
|
4 |
+
|
5 |
+
|
6 |
+
video_html = """
|
7 |
+
<style>
|
8 |
+
|
9 |
+
#myVideo {
|
10 |
+
position: fixed;
|
11 |
+
right: 0;
|
12 |
+
bottom: 0;
|
13 |
+
min-width: 100%;
|
14 |
+
min-height: 100%;
|
15 |
+
}
|
16 |
+
|
17 |
+
.content {
|
18 |
+
position: relative; /* Изменено на position: relative; */
|
19 |
+
bottom: 0;
|
20 |
+
background: rgba(0, 0, 0, 0.5);
|
21 |
+
color: #f1f1f1;
|
22 |
+
width: 100%;
|
23 |
+
padding: 20px;
|
24 |
+
}
|
25 |
+
|
26 |
+
[data-testid="stToolbar"] {
|
27 |
+
right: 2rem;
|
28 |
+
}
|
29 |
+
|
30 |
+
div.css-d6uc01.e1tzin5v0 {
|
31 |
+
background-color: rgba(238, 238, 238, 0.5);
|
32 |
+
border: 10px solid #EEEEEE;
|
33 |
+
padding: 5% 5% 5% 10%;
|
34 |
+
border-radius: 5px;
|
35 |
+
}
|
36 |
+
|
37 |
+
</style>
|
38 |
+
<video autoplay muted loop id="myVideo">
|
39 |
+
<source src="https://rr1---sn-p5qddn7k.googlevideo.com/videoplayback?expire=1686241935&ei=L66BZNrqIMyk1gL8k7WYBw&ip=195.146.4.71&id=o-ACQGiFTQT9zSqkQN4h25fAzhZMe6qZOWIIpIyGr73cBD&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398%2C399&source=youtube&requiressl=yes&spc=qEK7B4Ajz-YTBetD_q7arLcAD-_2Wp8uykt3IvqeDw&vprv=1&svpuc=1&mime=video%2Fmp4&ns=MXqQN23hmr3WGimsk9x_7X8N&gir=yes&clen=319656408&dur=3610.000&lmt=1607152879559618&keepalive=yes&fexp=24007246,24350017,51000023&beids=24350017&c=WEB&txp=5432434&n=uo3cc0_vHY-kPw&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAIjEwtX81aPmadQx2XmDlMcVouC05-QPJPqyqzkuuTLaAiEA-tv5uIzuSYMAMbx9Kmu70zxhie3AbbT__up_TPMPEJg%3D&redirect_counter=1&rm=sn-4g5erl76&req_id=87ca94ed90a0a3ee&cms_redirect=yes&cmsv=e&ipbypass=yes&mh=D8&mip=162.255.44.118&mm=31&mn=sn-p5qddn7k&ms=au&mt=1686221519&mv=u&mvi=1&pl=24&lsparams=ipbypass,mh,mip,mm,mn,ms,mv,mvi,pl&lsig=AG3C_xAwRgIhAN2wmu80rRefhfzquLHfXk-DNtZkmLB7C7Loh6qQOqrHAiEArWpdQHSmn0R2VP1H2xczNc5bCP5CBroUorzIJzQVlg8%3D")>
|
40 |
+
Your browser does not support HTML5 video.
|
41 |
+
</video>
|
42 |
+
"""
|
43 |
+
|
44 |
+
st.markdown(video_html, unsafe_allow_html=True)
|
45 |
+
|
46 |
+
col1, col2, col3 = st.columns([3,5,2])
|
47 |
+
|
48 |
+
with col2:
|
49 |
+
st.title('✨NLP Project by GPT-Team✨')
|
50 |
+
|
51 |
+
col1, col2, col3 = st.columns([2,5,2])
|
52 |
+
|
53 |
+
with col2:
|
54 |
+
st.markdown("<div style='text-align: center; font-size: 30px;'>Team members:</div>", unsafe_allow_html=True)
|
55 |
+
st.markdown("<div style='text-align: center; font-size: 25px;'>✨ Maria K. ✨ Osana B.</div>", unsafe_allow_html=True)
|
56 |
+
st.markdown("<div style='text-align: center; font-size: 25px;'>✨ Veronika K. ✨ Anna S.</div>", unsafe_allow_html=True)
|
57 |
+
st.markdown("<div style='text-align: center; font-size: 25px;'></div>", unsafe_allow_html=True)
|
58 |
+
st.markdown("<div style='text-align: center; font-size: 25px;'></div>", unsafe_allow_html=True)
|
pages/.ipynb_checkpoints/Без названия-checkpoint.ipynb
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [],
|
3 |
+
"metadata": {},
|
4 |
+
"nbformat": 4,
|
5 |
+
"nbformat_minor": 5
|
6 |
+
}
|
pages/.ipynb_checkpoints/✨first-checkpoint.py
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
import streamlit as st
|
4 |
+
import plotly.express as px
|
5 |
+
|
6 |
+
df = px.data.iris()
|
7 |
+
|
8 |
+
@st.cache_data
|
9 |
+
def get_img_as_base64(file):
|
10 |
+
with open(file, "rb") as f:
|
11 |
+
data = f.read()
|
12 |
+
return base64.b64encode(data).decode()
|
13 |
+
|
14 |
+
|
15 |
+
page_bg_img = f"""
|
16 |
+
<style>
|
17 |
+
[data-testid="stAppViewContainer"] > .main {{
|
18 |
+
background-image: url("https://wallpapercave.com/wp/wp6480460.jpg");
|
19 |
+
background-size: 115%;
|
20 |
+
background-position: top left;
|
21 |
+
background-repeat: no-repeat;
|
22 |
+
background-attachment: local;
|
23 |
+
}}
|
24 |
+
|
25 |
+
[data-testid="stSidebar"] > div:first-child {{
|
26 |
+
background-image: url("https://ibb.co/ZBkdJRg");
|
27 |
+
background-size: 115%;
|
28 |
+
background-position: center;
|
29 |
+
background-repeat: no-repeat;
|
30 |
+
background-attachment: fixed;
|
31 |
+
}}
|
32 |
+
|
33 |
+
[data-testid="stHeader"] {{
|
34 |
+
background: rgba(0,0,0,0);
|
35 |
+
}}
|
36 |
+
|
37 |
+
[data-testid="stToolbar"] {{
|
38 |
+
right: 2rem;
|
39 |
+
}}
|
40 |
+
|
41 |
+
div.css-1n76uvr.e1tzin5v0 {{
|
42 |
+
background-color: rgba(238, 238, 238, 0.5);
|
43 |
+
border: 10px solid #EEEEEE;
|
44 |
+
padding: 5% 5% 5% 10%;
|
45 |
+
border-radius: 5px;
|
46 |
+
}}
|
47 |
+
|
48 |
+
</style>
|
49 |
+
"""
|
50 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
51 |
+
|
52 |
+
import tensorflow as tf
|
53 |
+
from tensorflow import keras
|
54 |
+
import numpy as np
|
55 |
+
import matplotlib.pyplot as plt
|
56 |
+
|
57 |
+
################################################################################################
|
58 |
+
#Тут нужно будет добаить модель. Ниже пример:
|
59 |
+
|
60 |
+
# # Загрузка модели
|
61 |
+
# model = keras.models.load_model('cgan_model.h5')
|
62 |
+
|
63 |
+
# # Задание размерностей входных данных модели
|
64 |
+
# latent_dim = 128
|
65 |
+
# num_classes = 10
|
66 |
+
|
67 |
+
# # Функция для генерации изображения
|
68 |
+
# def generate_image(number):
|
69 |
+
# random_latent_vector = tf.random.normal(shape=(1, latent_dim))
|
70 |
+
# one_hot_label = tf.one_hot([number], num_classes)
|
71 |
+
# input_data = tf.concat([random_latent_vector, one_hot_label], axis=1)
|
72 |
+
|
73 |
+
# generated_image = model.predict(input_data)
|
74 |
+
# generated_image = generated_image.reshape(28, 28)
|
75 |
+
# generated_image = tf.image.resize(generated_image[None, ...], (28, 28))[0] # Добавлено [None, ...] для добавления измерения
|
76 |
+
# return generated_image
|
77 |
+
|
78 |
+
################################################################################################
|
79 |
+
|
80 |
+
#Оформление
|
81 |
+
|
82 |
+
col1, col2, col3 = st.columns([1,5,1])
|
83 |
+
with col2:
|
84 |
+
|
85 |
+
st.title('Название модели')
|
86 |
+
|
87 |
+
col1, col2, col3 = st.columns([2,5,2])
|
88 |
+
with col2:
|
89 |
+
|
90 |
+
number = st.slider('Выберите число:', 0, 9, step=1)
|
91 |
+
|
92 |
+
################################################################################################
|
93 |
+
# Часть, отображаемая на странице
|
94 |
+
|
95 |
+
# number = st.slider('Выберите число:', 0, 9, step=1)
|
96 |
+
|
97 |
+
|
98 |
+
# #col1.subheader("Гистограмма total_bill:")
|
99 |
+
|
100 |
+
# # Генерация и отображение изображения
|
101 |
+
# generated_image = generate_image(number)
|
102 |
+
# generated_image_np = generated_image.numpy() # Преобразование в массив NumPy
|
103 |
+
# fig, ax = plt.subplots()
|
104 |
+
# ax.scatter([1, 2], [1, 2], color='black')
|
105 |
+
# plt.imshow(generated_image_np, cmap='gray')
|
106 |
+
# plt.axis('off')
|
107 |
+
# fig.set_size_inches(3, 3)
|
108 |
+
# st.pyplot(fig)
|
109 |
+
|
110 |
+
################################################################################################
|
111 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
112 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
pages/.ipynb_checkpoints/✨second-checkpoint.py
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
import streamlit as st
|
4 |
+
import plotly.express as px
|
5 |
+
|
6 |
+
df = px.data.iris()
|
7 |
+
|
8 |
+
@st.cache_data
|
9 |
+
def get_img_as_base64(file):
|
10 |
+
with open(file, "rb") as f:
|
11 |
+
data = f.read()
|
12 |
+
return base64.b64encode(data).decode()
|
13 |
+
|
14 |
+
|
15 |
+
page_bg_img = f"""
|
16 |
+
<style>
|
17 |
+
[data-testid="stAppViewContainer"] > .main {{
|
18 |
+
background-image: url("https://wallpapercave.com/wp/wp6495731.jpg");
|
19 |
+
background-size: 115%;
|
20 |
+
background-position: top left;
|
21 |
+
background-repeat: no-repeat;
|
22 |
+
background-attachment: local;
|
23 |
+
}}
|
24 |
+
|
25 |
+
[data-testid="stSidebar"] > div:first-child {{
|
26 |
+
background-image: url("https://ibb.co/ZBkdJRg");
|
27 |
+
background-size: 115%;
|
28 |
+
background-position: center;
|
29 |
+
background-repeat: no-repeat;
|
30 |
+
background-attachment: fixed;
|
31 |
+
}}
|
32 |
+
|
33 |
+
[data-testid="stHeader"] {{
|
34 |
+
background: rgba(0,0,0,0);
|
35 |
+
}}
|
36 |
+
|
37 |
+
[data-testid="stToolbar"] {{
|
38 |
+
right: 2rem;
|
39 |
+
}}
|
40 |
+
|
41 |
+
div.css-1n76uvr.e1tzin5v0 {{
|
42 |
+
background-color: rgba(238, 238, 238, 0.5);
|
43 |
+
border: 10px solid #EEEEEE;
|
44 |
+
padding: 5% 5% 5% 10%;
|
45 |
+
border-radius: 5px;
|
46 |
+
}}
|
47 |
+
|
48 |
+
</style>
|
49 |
+
"""
|
50 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
51 |
+
|
52 |
+
import tensorflow as tf
|
53 |
+
from tensorflow import keras
|
54 |
+
import numpy as np
|
55 |
+
import matplotlib.pyplot as plt
|
56 |
+
|
57 |
+
################################################################################################
|
58 |
+
#Тут нужно будет добаить модель. Ниже пример:
|
59 |
+
|
60 |
+
# # Загрузка модели
|
61 |
+
# model = keras.models.load_model('cgan_model.h5')
|
62 |
+
|
63 |
+
# # Задание размерностей входных данных модели
|
64 |
+
# latent_dim = 128
|
65 |
+
# num_classes = 10
|
66 |
+
|
67 |
+
# # Функция для генерации изображения
|
68 |
+
# def generate_image(number):
|
69 |
+
# random_latent_vector = tf.random.normal(shape=(1, latent_dim))
|
70 |
+
# one_hot_label = tf.one_hot([number], num_classes)
|
71 |
+
# input_data = tf.concat([random_latent_vector, one_hot_label], axis=1)
|
72 |
+
|
73 |
+
# generated_image = model.predict(input_data)
|
74 |
+
# generated_image = generated_image.reshape(28, 28)
|
75 |
+
# generated_image = tf.image.resize(generated_image[None, ...], (28, 28))[0] # Добавлено [None, ...] для добавления измерения
|
76 |
+
# return generated_image
|
77 |
+
|
78 |
+
################################################################################################
|
79 |
+
|
80 |
+
#Оформление
|
81 |
+
|
82 |
+
col1, col2, col3 = st.columns([1,5,1])
|
83 |
+
with col2:
|
84 |
+
|
85 |
+
st.title('Название модели')
|
86 |
+
|
87 |
+
col1, col2, col3 = st.columns([2,5,2])
|
88 |
+
with col2:
|
89 |
+
|
90 |
+
number = st.slider('Выберите число:', 0, 9, step=1)
|
91 |
+
|
92 |
+
################################################################################################
|
93 |
+
# Часть, отображаемая на странице
|
94 |
+
|
95 |
+
# number = st.slider('Выберите число:', 0, 9, step=1)
|
96 |
+
|
97 |
+
|
98 |
+
# #col1.subheader("Гистограмма total_bill:")
|
99 |
+
|
100 |
+
# # Генерация и отображение изображения
|
101 |
+
# generated_image = generate_image(number)
|
102 |
+
# generated_image_np = generated_image.numpy() # Преобразование в массив NumPy
|
103 |
+
# fig, ax = plt.subplots()
|
104 |
+
# ax.scatter([1, 2], [1, 2], color='black')
|
105 |
+
# plt.imshow(generated_image_np, cmap='gray')
|
106 |
+
# plt.axis('off')
|
107 |
+
# fig.set_size_inches(3, 3)
|
108 |
+
# st.pyplot(fig)
|
109 |
+
|
110 |
+
################################################################################################
|
111 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
112 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
pages/.ipynb_checkpoints/✨third-checkpoint.py
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
import streamlit as st
|
4 |
+
import plotly.express as px
|
5 |
+
|
6 |
+
df = px.data.iris()
|
7 |
+
|
8 |
+
@st.cache_data
|
9 |
+
def get_img_as_base64(file):
|
10 |
+
with open(file, "rb") as f:
|
11 |
+
data = f.read()
|
12 |
+
return base64.b64encode(data).decode()
|
13 |
+
|
14 |
+
|
15 |
+
#img = get_img_as_base64("https://catherineasquithgallery.com/uploads/posts/2021-02/1612739741_65-p-goluboi-fon-tsifri-110.jpg")
|
16 |
+
|
17 |
+
page_bg_img = f"""
|
18 |
+
<style>
|
19 |
+
[data-testid="stAppViewContainer"] > .main {{
|
20 |
+
background-image: url("https://wallpapercave.com/wp/wp11966930.jpg");
|
21 |
+
background-size: 115%;
|
22 |
+
background-position: top left;
|
23 |
+
background-repeat: no-repeat;
|
24 |
+
background-attachment: local;
|
25 |
+
}}
|
26 |
+
|
27 |
+
[data-testid="stSidebar"] > div:first-child {{
|
28 |
+
background-image: url("https://ibb.co/ZBkdJRg");
|
29 |
+
background-size: 115%;
|
30 |
+
background-position: center;
|
31 |
+
background-repeat: no-repeat;
|
32 |
+
background-attachment: fixed;
|
33 |
+
}}
|
34 |
+
|
35 |
+
[data-testid="stHeader"] {{
|
36 |
+
background: rgba(0,0,0,0);
|
37 |
+
}}
|
38 |
+
|
39 |
+
[data-testid="stToolbar"] {{
|
40 |
+
right: 2rem;
|
41 |
+
}}
|
42 |
+
|
43 |
+
div.css-1n76uvr.e1tzin5v0 {{
|
44 |
+
background-color: rgba(238, 238, 238, 0.5);
|
45 |
+
border: 10px solid #EEEEEE;
|
46 |
+
padding: 5% 5% 5% 10%;
|
47 |
+
border-radius: 5px;
|
48 |
+
}}
|
49 |
+
|
50 |
+
</style>
|
51 |
+
"""
|
52 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
53 |
+
|
54 |
+
import tensorflow as tf
|
55 |
+
from tensorflow import keras
|
56 |
+
import numpy as np
|
57 |
+
import matplotlib.pyplot as plt
|
58 |
+
|
59 |
+
################################################################################################
|
60 |
+
#Тут нужно будет добаить модель. Ниже пример:
|
61 |
+
|
62 |
+
# # Загрузка модели
|
63 |
+
# model = keras.models.load_model('cgan_model.h5')
|
64 |
+
|
65 |
+
# # Задание размерностей входных данных модели
|
66 |
+
# latent_dim = 128
|
67 |
+
# num_classes = 10
|
68 |
+
|
69 |
+
# # Функция для генерации изображения
|
70 |
+
# def generate_image(number):
|
71 |
+
# random_latent_vector = tf.random.normal(shape=(1, latent_dim))
|
72 |
+
# one_hot_label = tf.one_hot([number], num_classes)
|
73 |
+
# input_data = tf.concat([random_latent_vector, one_hot_label], axis=1)
|
74 |
+
|
75 |
+
# generated_image = model.predict(input_data)
|
76 |
+
# generated_image = generated_image.reshape(28, 28)
|
77 |
+
# generated_image = tf.image.resize(generated_image[None, ...], (28, 28))[0] # Добавлено [None, ...] для добавления измерения
|
78 |
+
# return generated_image
|
79 |
+
|
80 |
+
################################################################################################
|
81 |
+
|
82 |
+
#Оформление
|
83 |
+
|
84 |
+
col1, col2, col3 = st.columns([1,5,1])
|
85 |
+
with col2:
|
86 |
+
|
87 |
+
st.title('Название модели')
|
88 |
+
|
89 |
+
col1, col2, col3 = st.columns([2,5,2])
|
90 |
+
with col2:
|
91 |
+
|
92 |
+
number = st.slider('Выберите число:', 0, 9, step=1)
|
93 |
+
|
94 |
+
################################################################################################
|
95 |
+
# Часть, отображаемая на странице
|
96 |
+
|
97 |
+
# number = st.slider('Выберите число:', 0, 9, step=1)
|
98 |
+
|
99 |
+
|
100 |
+
# #col1.subheader("Гистограмма total_bill:")
|
101 |
+
|
102 |
+
# # Генерация и отображение изображения
|
103 |
+
# generated_image = generate_image(number)
|
104 |
+
# generated_image_np = generated_image.numpy() # Преобразование в массив NumPy
|
105 |
+
# fig, ax = plt.subplots()
|
106 |
+
# ax.scatter([1, 2], [1, 2], color='black')
|
107 |
+
# plt.imshow(generated_image_np, cmap='gray')
|
108 |
+
# plt.axis('off')
|
109 |
+
# fig.set_size_inches(3, 3)
|
110 |
+
# st.pyplot(fig)
|
111 |
+
|
112 |
+
################################################################################################
|
113 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
114 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
pages/Без названия.ipynb
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"id": "99cbbaf3-6005-4e37-8855-f1d675211128",
|
7 |
+
"metadata": {},
|
8 |
+
"outputs": [
|
9 |
+
{
|
10 |
+
"name": "stdout",
|
11 |
+
"output_type": "stream",
|
12 |
+
"text": [
|
13 |
+
"absl-py==1.4.0\n",
|
14 |
+
"aiofiles==23.1.0\n",
|
15 |
+
"aiogram==2.25.1\n",
|
16 |
+
"aiohttp==3.8.4\n",
|
17 |
+
"aiosignal==1.3.1\n",
|
18 |
+
"altair==4.2.2\n",
|
19 |
+
"anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1666191106763/work/dist\n",
|
20 |
+
"appdirs==1.4.4\n",
|
21 |
+
"argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work\n",
|
22 |
+
"argon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1666850768662/work\n",
|
23 |
+
"asttokens==2.2.1\n",
|
24 |
+
"astunparse==1.6.3\n",
|
25 |
+
"async-timeout==4.0.2\n",
|
26 |
+
"attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1671632566681/work\n",
|
27 |
+
"Babel==2.9.1\n",
|
28 |
+
"backcall==0.2.0\n",
|
29 |
+
"backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work\n",
|
30 |
+
"beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1679322162244/work\n",
|
31 |
+
"bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1674535352125/work\n",
|
32 |
+
"blinker==1.6.1\n",
|
33 |
+
"brotlipy @ file:///home/conda/feedstock_root/build_artifacts/brotlipy_1666764671472/work\n",
|
34 |
+
"cachetools==5.3.0\n",
|
35 |
+
"catboost==1.2\n",
|
36 |
+
"certifi==2022.12.7\n",
|
37 |
+
"cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1671179353105/work\n",
|
38 |
+
"charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1661170624537/work\n",
|
39 |
+
"click==8.1.3\n",
|
40 |
+
"cloudpickle==2.2.1\n",
|
41 |
+
"cmake==3.25.0\n",
|
42 |
+
"colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work\n",
|
43 |
+
"comm==0.1.3\n",
|
44 |
+
"conda==23.1.0\n",
|
45 |
+
"conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1669907009957/work\n",
|
46 |
+
"conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1669733752472/work\n",
|
47 |
+
"contourpy==1.0.7\n",
|
48 |
+
"cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography-split_1675828607645/work\n",
|
49 |
+
"cycler==0.11.0\n",
|
50 |
+
"Cython==0.29.34\n",
|
51 |
+
"debugpy==1.6.6\n",
|
52 |
+
"decorator==5.1.1\n",
|
53 |
+
"defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work\n",
|
54 |
+
"Deprecated==1.2.13\n",
|
55 |
+
"entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work\n",
|
56 |
+
"executing==1.2.0\n",
|
57 |
+
"fastapi==0.95.2\n",
|
58 |
+
"fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1677336799617/work/dist\n",
|
59 |
+
"ffmpy==0.3.0\n",
|
60 |
+
"filelock==3.9.0\n",
|
61 |
+
"flatbuffers==23.5.26\n",
|
62 |
+
"flit_core @ file:///home/conda/feedstock_root/build_artifacts/flit-core_1667734568827/work/source/flit_core\n",
|
63 |
+
"fonttools==4.39.3\n",
|
64 |
+
"frozendict==2.3.7\n",
|
65 |
+
"frozenlist==1.3.3\n",
|
66 |
+
"fsspec==2023.5.0\n",
|
67 |
+
"gast==0.4.0\n",
|
68 |
+
"gitdb==4.0.10\n",
|
69 |
+
"GitPython==3.1.31\n",
|
70 |
+
"google-auth==2.19.1\n",
|
71 |
+
"google-auth-oauthlib==1.0.0\n",
|
72 |
+
"google-pasta==0.2.0\n",
|
73 |
+
"gradio==3.32.0\n",
|
74 |
+
"gradio_client==0.2.5\n",
|
75 |
+
"graphviz==0.20.1\n",
|
76 |
+
"grpcio==1.54.2\n",
|
77 |
+
"h11==0.14.0\n",
|
78 |
+
"h5py==3.8.0\n",
|
79 |
+
"html5lib==1.1\n",
|
80 |
+
"httpcore==0.17.2\n",
|
81 |
+
"httpx==0.24.1\n",
|
82 |
+
"huggingface-hub==0.14.1\n",
|
83 |
+
"humanize==4.6.0\n",
|
84 |
+
"idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work\n",
|
85 |
+
"importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1679167925176/work\n",
|
86 |
+
"importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1676919000169/work\n",
|
87 |
+
"ipykernel==6.22.0\n",
|
88 |
+
"ipython==8.12.0\n",
|
89 |
+
"ipython-genutils==0.2.0\n",
|
90 |
+
"jax==0.4.11\n",
|
91 |
+
"jedi==0.18.2\n",
|
92 |
+
"Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1654302431367/work\n",
|
93 |
+
"joblib==1.2.0\n",
|
94 |
+
"json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1600692310011/work\n",
|
95 |
+
"jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1669810440410/work\n",
|
96 |
+
"jupyter-events @ file:///home/conda/feedstock_root/build_artifacts/jupyter_events_1673559782596/work\n",
|
97 |
+
"jupyter_client==8.1.0\n",
|
98 |
+
"jupyter_core==5.3.0\n",
|
99 |
+
"jupyter_server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1679073341944/work\n",
|
100 |
+
"jupyter_server_terminals @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_terminals_1673491454549/work\n",
|
101 |
+
"jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1666613090338/work\n",
|
102 |
+
"jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1649936611996/work\n",
|
103 |
+
"jupyterlab_server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1679528718717/work\n",
|
104 |
+
"keras==2.12.0\n",
|
105 |
+
"kiwisolver==1.4.4\n",
|
106 |
+
"libclang==16.0.0\n",
|
107 |
+
"linkify-it-py==2.0.2\n",
|
108 |
+
"lit==15.0.7\n",
|
109 |
+
"llvmlite==0.40.0\n",
|
110 |
+
"lxml==4.9.2\n",
|
111 |
+
"magic-filter==1.0.9\n",
|
112 |
+
"Markdown==3.4.3\n",
|
113 |
+
"markdown-it-py==2.2.0\n",
|
114 |
+
"MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1674135787083/work\n",
|
115 |
+
"matplotlib==3.7.1\n",
|
116 |
+
"matplotlib-inline==0.1.6\n",
|
117 |
+
"mdit-py-plugins==0.3.3\n",
|
118 |
+
"mdurl==0.1.2\n",
|
119 |
+
"mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1675771498296/work\n",
|
120 |
+
"ml-dtypes==0.1.0\n",
|
121 |
+
"mlxtend==0.22.0\n",
|
122 |
+
"mpmath==1.2.1\n",
|
123 |
+
"multidict==6.0.4\n",
|
124 |
+
"multitasking==0.0.11\n",
|
125 |
+
"nbclassic @ file:///home/conda/feedstock_root/build_artifacts/nbclassic_1678277563913/work\n",
|
126 |
+
"nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1669795076334/work\n",
|
127 |
+
"nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1674590374792/work\n",
|
128 |
+
"nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1679336765223/work\n",
|
129 |
+
"nest-asyncio==1.5.6\n",
|
130 |
+
"networkx==3.0\n",
|
131 |
+
"nibabel==5.1.0\n",
|
132 |
+
"nltk==3.8.1\n",
|
133 |
+
"notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1678109761260/work\n",
|
134 |
+
"notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1667478401171/work\n",
|
135 |
+
"numba==0.57.0\n",
|
136 |
+
"numpy==1.23.5\n",
|
137 |
+
"oauthlib==3.2.2\n",
|
138 |
+
"opt-einsum==3.3.0\n",
|
139 |
+
"orjson==3.8.14\n",
|
140 |
+
"packaging==23.0\n",
|
141 |
+
"pandas==1.5.3\n",
|
142 |
+
"pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work\n",
|
143 |
+
"parso==0.8.3\n",
|
144 |
+
"patsy==0.5.3\n",
|
145 |
+
"pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1667297516076/work\n",
|
146 |
+
"pickleshare==0.7.5\n",
|
147 |
+
"Pillow==9.5.0\n",
|
148 |
+
"pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1633981968097/work\n",
|
149 |
+
"platformdirs==3.2.0\n",
|
150 |
+
"plotly==5.14.1\n",
|
151 |
+
"pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1667232663820/work\n",
|
152 |
+
"pmdarima==2.0.3\n",
|
153 |
+
"prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1674535637125/work\n",
|
154 |
+
"prompt-toolkit==3.0.38\n",
|
155 |
+
"protobuf==3.20.3\n",
|
156 |
+
"psutil==5.9.4\n",
|
157 |
+
"ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl\n",
|
158 |
+
"pure-eval==0.2.2\n",
|
159 |
+
"pyarrow==11.0.0\n",
|
160 |
+
"pyasn1==0.5.0\n",
|
161 |
+
"pyasn1-modules==0.3.0\n",
|
162 |
+
"pycosat @ file:///home/conda/feedstock_root/build_artifacts/pycosat_1666836542287/work\n",
|
163 |
+
"pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work\n",
|
164 |
+
"pydantic==1.10.8\n",
|
165 |
+
"pydeck==0.8.0\n",
|
166 |
+
"pydub==0.25.1\n",
|
167 |
+
"pyenchant==3.2.2\n",
|
168 |
+
"Pygments==2.14.0\n",
|
169 |
+
"Pympler==1.0.1\n",
|
170 |
+
"pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1672659226110/work\n",
|
171 |
+
"pyparsing==3.0.9\n",
|
172 |
+
"pyrsistent @ file:///home/conda/feedstock_root/build_artifacts/pyrsistent_1672681463845/work\n",
|
173 |
+
"PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work\n",
|
174 |
+
"python-dateutil==2.8.2\n",
|
175 |
+
"python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1677079630776/work\n",
|
176 |
+
"python-multipart==0.0.6\n",
|
177 |
+
"python-telegram-bot==20.3\n",
|
178 |
+
"pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1679742222779/work\n",
|
179 |
+
"pytz-deprecation-shim==0.1.0.post0\n",
|
180 |
+
"PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1666772395347/work\n",
|
181 |
+
"pyzmq==25.0.2\n",
|
182 |
+
"regex==2023.5.5\n",
|
183 |
+
"requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1673863902341/work\n",
|
184 |
+
"requests-oauthlib==1.3.1\n",
|
185 |
+
"rfc3339-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3339-validator_1638811747357/work\n",
|
186 |
+
"rfc3986-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3986-validator_1598024191506/work\n",
|
187 |
+
"rich==13.3.3\n",
|
188 |
+
"rsa==4.9\n",
|
189 |
+
"ruamel.yaml @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml_1666827327415/work\n",
|
190 |
+
"ruamel.yaml.clib @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml.clib_1670412719074/work\n",
|
191 |
+
"scikit-learn==1.2.2\n",
|
192 |
+
"scipy==1.10.1\n",
|
193 |
+
"seaborn==0.12.2\n",
|
194 |
+
"semantic-version==2.10.0\n",
|
195 |
+
"Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1628511208346/work\n",
|
196 |
+
"shap==0.41.0\n",
|
197 |
+
"shellingham==1.5.0.post1\n",
|
198 |
+
"SimpleITK==2.2.1\n",
|
199 |
+
"six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work\n",
|
200 |
+
"sklearn==0.0.post1\n",
|
201 |
+
"slicer==0.0.7\n",
|
202 |
+
"smmap==5.0.0\n",
|
203 |
+
"sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1662051266223/work\n",
|
204 |
+
"soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1658207591808/work\n",
|
205 |
+
"stack-data==0.6.2\n",
|
206 |
+
"starlette==0.27.0\n",
|
207 |
+
"statsmodels==0.14.0\n",
|
208 |
+
"streamlit==1.23.1\n",
|
209 |
+
"streamlit-nightly==1.23.2.dev20230607\n",
|
210 |
+
"sympy==1.11.1\n",
|
211 |
+
"tabulate==0.9.0\n",
|
212 |
+
"tenacity==8.2.2\n",
|
213 |
+
"tensorboard==2.12.3\n",
|
214 |
+
"tensorboard-data-server==0.7.0\n",
|
215 |
+
"tensorflow==2.12.0\n",
|
216 |
+
"tensorflow-estimator==2.12.0\n",
|
217 |
+
"tensorflow-io-gcs-filesystem==0.32.0\n",
|
218 |
+
"termcolor==2.3.0\n",
|
219 |
+
"terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1670253674810/work\n",
|
220 |
+
"threadpoolctl==3.1.0\n",
|
221 |
+
"tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1666100256010/work\n",
|
222 |
+
"toml==0.10.2\n",
|
223 |
+
"tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work\n",
|
224 |
+
"toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work\n",
|
225 |
+
"torch==2.0.1+cu118\n",
|
226 |
+
"torchaudio==2.0.2+cu118\n",
|
227 |
+
"torchio==0.18.91\n",
|
228 |
+
"torchmetrics==0.11.4\n",
|
229 |
+
"torchutils==0.0.4\n",
|
230 |
+
"torchvision==0.15.2+cu118\n",
|
231 |
+
"tornado==6.2\n",
|
232 |
+
"tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1662214488106/work\n",
|
233 |
+
"traitlets==5.9.0\n",
|
234 |
+
"translit==0.2a1\n",
|
235 |
+
"triton==2.0.0\n",
|
236 |
+
"typer==0.9.0\n",
|
237 |
+
"typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1678559861143/work\n",
|
238 |
+
"tzdata==2023.3\n",
|
239 |
+
"tzlocal==4.3\n",
|
240 |
+
"uc-micro-py==1.0.2\n",
|
241 |
+
"urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1673452138552/work\n",
|
242 |
+
"uvicorn==0.22.0\n",
|
243 |
+
"validators==0.20.0\n",
|
244 |
+
"watchdog==3.0.0\n",
|
245 |
+
"wcwidth==0.2.6\n",
|
246 |
+
"webencodings==0.5.1\n",
|
247 |
+
"websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1675567828044/work\n",
|
248 |
+
"websockets==11.0.3\n",
|
249 |
+
"Werkzeug==2.3.4\n",
|
250 |
+
"wrapt==1.14.1\n",
|
251 |
+
"xlrd==2.0.1\n",
|
252 |
+
"yarl==1.8.2\n",
|
253 |
+
"yellowbrick==1.5\n",
|
254 |
+
"yfinance==0.2.17\n",
|
255 |
+
"zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1677313463193/work\n",
|
256 |
+
"zstandard==0.19.0\n",
|
257 |
+
"Note: you may need to restart the kernel to use updated packages.\n"
|
258 |
+
]
|
259 |
+
}
|
260 |
+
],
|
261 |
+
"source": [
|
262 |
+
"pip freeze"
|
263 |
+
]
|
264 |
+
},
|
265 |
+
{
|
266 |
+
"cell_type": "code",
|
267 |
+
"execution_count": 3,
|
268 |
+
"id": "fba03be3-8dd0-48d4-898c-a7eb2fd5c292",
|
269 |
+
"metadata": {},
|
270 |
+
"outputs": [],
|
271 |
+
"source": [
|
272 |
+
"import torch"
|
273 |
+
]
|
274 |
+
},
|
275 |
+
{
|
276 |
+
"cell_type": "code",
|
277 |
+
"execution_count": 4,
|
278 |
+
"id": "fe9c5e5e-2bc8-4585-93e1-4b777ddeb7c4",
|
279 |
+
"metadata": {},
|
280 |
+
"outputs": [
|
281 |
+
{
|
282 |
+
"data": {
|
283 |
+
"text/plain": [
|
284 |
+
"'2.0.1+cu118'"
|
285 |
+
]
|
286 |
+
},
|
287 |
+
"execution_count": 4,
|
288 |
+
"metadata": {},
|
289 |
+
"output_type": "execute_result"
|
290 |
+
}
|
291 |
+
],
|
292 |
+
"source": [
|
293 |
+
"torch.__version__"
|
294 |
+
]
|
295 |
+
},
|
296 |
+
{
|
297 |
+
"cell_type": "code",
|
298 |
+
"execution_count": null,
|
299 |
+
"id": "ce5f014d-d484-43a6-ad7f-9e0ba8ba46af",
|
300 |
+
"metadata": {},
|
301 |
+
"outputs": [],
|
302 |
+
"source": []
|
303 |
+
}
|
304 |
+
],
|
305 |
+
"metadata": {
|
306 |
+
"kernelspec": {
|
307 |
+
"display_name": "Python 3 (ipykernel)",
|
308 |
+
"language": "python",
|
309 |
+
"name": "python3"
|
310 |
+
},
|
311 |
+
"language_info": {
|
312 |
+
"codemirror_mode": {
|
313 |
+
"name": "ipython",
|
314 |
+
"version": 3
|
315 |
+
},
|
316 |
+
"file_extension": ".py",
|
317 |
+
"mimetype": "text/x-python",
|
318 |
+
"name": "python",
|
319 |
+
"nbconvert_exporter": "python",
|
320 |
+
"pygments_lexer": "ipython3",
|
321 |
+
"version": "3.10.9"
|
322 |
+
}
|
323 |
+
},
|
324 |
+
"nbformat": 4,
|
325 |
+
"nbformat_minor": 5
|
326 |
+
}
|
pages/✨first.py
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
import streamlit as st
|
4 |
+
import plotly.express as px
|
5 |
+
|
6 |
+
df = px.data.iris()
|
7 |
+
|
8 |
+
@st.cache_data
|
9 |
+
def get_img_as_base64(file):
|
10 |
+
with open(file, "rb") as f:
|
11 |
+
data = f.read()
|
12 |
+
return base64.b64encode(data).decode()
|
13 |
+
|
14 |
+
|
15 |
+
page_bg_img = f"""
|
16 |
+
<style>
|
17 |
+
[data-testid="stAppViewContainer"] > .main {{
|
18 |
+
background-image: url("https://wallpapercave.com/wp/wp6480460.jpg");
|
19 |
+
background-size: 115%;
|
20 |
+
background-position: top left;
|
21 |
+
background-repeat: no-repeat;
|
22 |
+
background-attachment: local;
|
23 |
+
}}
|
24 |
+
|
25 |
+
[data-testid="stSidebar"] > div:first-child {{
|
26 |
+
background-image: url("https://ibb.co/ZBkdJRg");
|
27 |
+
background-size: 115%;
|
28 |
+
background-position: center;
|
29 |
+
background-repeat: no-repeat;
|
30 |
+
background-attachment: fixed;
|
31 |
+
}}
|
32 |
+
|
33 |
+
[data-testid="stHeader"] {{
|
34 |
+
background: rgba(0,0,0,0);
|
35 |
+
}}
|
36 |
+
|
37 |
+
[data-testid="stToolbar"] {{
|
38 |
+
right: 2rem;
|
39 |
+
}}
|
40 |
+
|
41 |
+
div.css-1n76uvr.e1tzin5v0 {{
|
42 |
+
background-color: rgba(238, 238, 238, 0.5);
|
43 |
+
border: 10px solid #EEEEEE;
|
44 |
+
padding: 5% 5% 5% 10%;
|
45 |
+
border-radius: 5px;
|
46 |
+
}}
|
47 |
+
|
48 |
+
</style>
|
49 |
+
"""
|
50 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
51 |
+
|
52 |
+
import tensorflow as tf
|
53 |
+
from tensorflow import keras
|
54 |
+
import numpy as np
|
55 |
+
import matplotlib.pyplot as plt
|
56 |
+
|
57 |
+
################################################################################################
|
58 |
+
#Тут нужно будет добаить модель. Ниже пример:
|
59 |
+
|
60 |
+
# # Загрузка модели
|
61 |
+
# model = keras.models.load_model('cgan_model.h5')
|
62 |
+
|
63 |
+
# # Задание размерностей входных данных модели
|
64 |
+
# latent_dim = 128
|
65 |
+
# num_classes = 10
|
66 |
+
|
67 |
+
# # Функция для генерации изображения
|
68 |
+
# def generate_image(number):
|
69 |
+
# random_latent_vector = tf.random.normal(shape=(1, latent_dim))
|
70 |
+
# one_hot_label = tf.one_hot([number], num_classes)
|
71 |
+
# input_data = tf.concat([random_latent_vector, one_hot_label], axis=1)
|
72 |
+
|
73 |
+
# generated_image = model.predict(input_data)
|
74 |
+
# generated_image = generated_image.reshape(28, 28)
|
75 |
+
# generated_image = tf.image.resize(generated_image[None, ...], (28, 28))[0] # Добавлено [None, ...] для добавления измерения
|
76 |
+
# return generated_image
|
77 |
+
|
78 |
+
################################################################################################
|
79 |
+
|
80 |
+
#Оформление
|
81 |
+
|
82 |
+
col1, col2, col3 = st.columns([1,5,1])
|
83 |
+
with col2:
|
84 |
+
|
85 |
+
st.title('Название модели')
|
86 |
+
|
87 |
+
col1, col2, col3 = st.columns([2,5,2])
|
88 |
+
with col2:
|
89 |
+
|
90 |
+
number = st.slider('Выберите число:', 0, 9, step=1)
|
91 |
+
|
92 |
+
################################################################################################
|
93 |
+
# Часть, отображаемая на странице
|
94 |
+
|
95 |
+
# number = st.slider('Выберите число:', 0, 9, step=1)
|
96 |
+
|
97 |
+
|
98 |
+
# #col1.subheader("Гистограмма total_bill:")
|
99 |
+
|
100 |
+
# # Генерация и отображение изображения
|
101 |
+
# generated_image = generate_image(number)
|
102 |
+
# generated_image_np = generated_image.numpy() # Преобразование в массив NumPy
|
103 |
+
# fig, ax = plt.subplots()
|
104 |
+
# ax.scatter([1, 2], [1, 2], color='black')
|
105 |
+
# plt.imshow(generated_image_np, cmap='gray')
|
106 |
+
# plt.axis('off')
|
107 |
+
# fig.set_size_inches(3, 3)
|
108 |
+
# st.pyplot(fig)
|
109 |
+
|
110 |
+
################################################################################################
|
111 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
112 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
pages/✨second.py
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
import streamlit as st
|
4 |
+
import plotly.express as px
|
5 |
+
|
6 |
+
df = px.data.iris()
|
7 |
+
|
8 |
+
@st.cache_data
|
9 |
+
def get_img_as_base64(file):
|
10 |
+
with open(file, "rb") as f:
|
11 |
+
data = f.read()
|
12 |
+
return base64.b64encode(data).decode()
|
13 |
+
|
14 |
+
|
15 |
+
page_bg_img = f"""
|
16 |
+
<style>
|
17 |
+
[data-testid="stAppViewContainer"] > .main {{
|
18 |
+
background-image: url("https://wallpapercave.com/wp/wp6495731.jpg");
|
19 |
+
background-size: 115%;
|
20 |
+
background-position: top left;
|
21 |
+
background-repeat: no-repeat;
|
22 |
+
background-attachment: local;
|
23 |
+
}}
|
24 |
+
|
25 |
+
[data-testid="stSidebar"] > div:first-child {{
|
26 |
+
background-image: url("https://ibb.co/ZBkdJRg");
|
27 |
+
background-size: 115%;
|
28 |
+
background-position: center;
|
29 |
+
background-repeat: no-repeat;
|
30 |
+
background-attachment: fixed;
|
31 |
+
}}
|
32 |
+
|
33 |
+
[data-testid="stHeader"] {{
|
34 |
+
background: rgba(0,0,0,0);
|
35 |
+
}}
|
36 |
+
|
37 |
+
[data-testid="stToolbar"] {{
|
38 |
+
right: 2rem;
|
39 |
+
}}
|
40 |
+
|
41 |
+
div.css-1n76uvr.e1tzin5v0 {{
|
42 |
+
background-color: rgba(238, 238, 238, 0.5);
|
43 |
+
border: 10px solid #EEEEEE;
|
44 |
+
padding: 5% 5% 5% 10%;
|
45 |
+
border-radius: 5px;
|
46 |
+
}}
|
47 |
+
|
48 |
+
</style>
|
49 |
+
"""
|
50 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
51 |
+
|
52 |
+
import tensorflow as tf
|
53 |
+
from tensorflow import keras
|
54 |
+
import numpy as np
|
55 |
+
import matplotlib.pyplot as plt
|
56 |
+
|
57 |
+
################################################################################################
|
58 |
+
#Тут нужно будет добаить модель. Ниже пример:
|
59 |
+
|
60 |
+
# # Загрузка модели
|
61 |
+
# model = keras.models.load_model('cgan_model.h5')
|
62 |
+
|
63 |
+
# # Задание размерностей входных данных модели
|
64 |
+
# latent_dim = 128
|
65 |
+
# num_classes = 10
|
66 |
+
|
67 |
+
# # Функция для генерации изображения
|
68 |
+
# def generate_image(number):
|
69 |
+
# random_latent_vector = tf.random.normal(shape=(1, latent_dim))
|
70 |
+
# one_hot_label = tf.one_hot([number], num_classes)
|
71 |
+
# input_data = tf.concat([random_latent_vector, one_hot_label], axis=1)
|
72 |
+
|
73 |
+
# generated_image = model.predict(input_data)
|
74 |
+
# generated_image = generated_image.reshape(28, 28)
|
75 |
+
# generated_image = tf.image.resize(generated_image[None, ...], (28, 28))[0] # Добавлено [None, ...] для добавления измерения
|
76 |
+
# return generated_image
|
77 |
+
|
78 |
+
################################################################################################
|
79 |
+
|
80 |
+
#Оформление
|
81 |
+
|
82 |
+
col1, col2, col3 = st.columns([1,5,1])
|
83 |
+
with col2:
|
84 |
+
|
85 |
+
st.title('Название модели')
|
86 |
+
|
87 |
+
col1, col2, col3 = st.columns([2,5,2])
|
88 |
+
with col2:
|
89 |
+
|
90 |
+
number = st.slider('Выберите число:', 0, 9, step=1)
|
91 |
+
|
92 |
+
################################################################################################
|
93 |
+
# Часть, отображаемая на странице
|
94 |
+
|
95 |
+
# number = st.slider('Выберите число:', 0, 9, step=1)
|
96 |
+
|
97 |
+
|
98 |
+
# #col1.subheader("Гистограмма total_bill:")
|
99 |
+
|
100 |
+
# # Генерация и отображение изображения
|
101 |
+
# generated_image = generate_image(number)
|
102 |
+
# generated_image_np = generated_image.numpy() # Преобразование в массив NumPy
|
103 |
+
# fig, ax = plt.subplots()
|
104 |
+
# ax.scatter([1, 2], [1, 2], color='black')
|
105 |
+
# plt.imshow(generated_image_np, cmap='gray')
|
106 |
+
# plt.axis('off')
|
107 |
+
# fig.set_size_inches(3, 3)
|
108 |
+
# st.pyplot(fig)
|
109 |
+
|
110 |
+
################################################################################################
|
111 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
112 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
pages/✨third.py
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import base64
|
3 |
+
import streamlit as st
|
4 |
+
import plotly.express as px
|
5 |
+
|
6 |
+
df = px.data.iris()
|
7 |
+
|
8 |
+
@st.cache_data
|
9 |
+
def get_img_as_base64(file):
|
10 |
+
with open(file, "rb") as f:
|
11 |
+
data = f.read()
|
12 |
+
return base64.b64encode(data).decode()
|
13 |
+
|
14 |
+
|
15 |
+
#img = get_img_as_base64("https://catherineasquithgallery.com/uploads/posts/2021-02/1612739741_65-p-goluboi-fon-tsifri-110.jpg")
|
16 |
+
|
17 |
+
page_bg_img = f"""
|
18 |
+
<style>
|
19 |
+
[data-testid="stAppViewContainer"] > .main {{
|
20 |
+
background-image: url("https://wallpapercave.com/wp/wp11966930.jpg");
|
21 |
+
background-size: 115%;
|
22 |
+
background-position: top left;
|
23 |
+
background-repeat: no-repeat;
|
24 |
+
background-attachment: local;
|
25 |
+
}}
|
26 |
+
|
27 |
+
[data-testid="stSidebar"] > div:first-child {{
|
28 |
+
background-image: url("https://ibb.co/ZBkdJRg");
|
29 |
+
background-size: 115%;
|
30 |
+
background-position: center;
|
31 |
+
background-repeat: no-repeat;
|
32 |
+
background-attachment: fixed;
|
33 |
+
}}
|
34 |
+
|
35 |
+
[data-testid="stHeader"] {{
|
36 |
+
background: rgba(0,0,0,0);
|
37 |
+
}}
|
38 |
+
|
39 |
+
[data-testid="stToolbar"] {{
|
40 |
+
right: 2rem;
|
41 |
+
}}
|
42 |
+
|
43 |
+
div.css-1n76uvr.e1tzin5v0 {{
|
44 |
+
background-color: rgba(238, 238, 238, 0.5);
|
45 |
+
border: 10px solid #EEEEEE;
|
46 |
+
padding: 5% 5% 5% 10%;
|
47 |
+
border-radius: 5px;
|
48 |
+
}}
|
49 |
+
|
50 |
+
</style>
|
51 |
+
"""
|
52 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
53 |
+
|
54 |
+
import tensorflow as tf
|
55 |
+
from tensorflow import keras
|
56 |
+
import numpy as np
|
57 |
+
import matplotlib.pyplot as plt
|
58 |
+
|
59 |
+
################################################################################################
|
60 |
+
#Тут нужно будет добаить модель. Ниже пример:
|
61 |
+
|
62 |
+
# # Загрузка модели
|
63 |
+
# model = keras.models.load_model('cgan_model.h5')
|
64 |
+
|
65 |
+
# # Задание размерностей входных данных модели
|
66 |
+
# latent_dim = 128
|
67 |
+
# num_classes = 10
|
68 |
+
|
69 |
+
# # Функция для генерации изображения
|
70 |
+
# def generate_image(number):
|
71 |
+
# random_latent_vector = tf.random.normal(shape=(1, latent_dim))
|
72 |
+
# one_hot_label = tf.one_hot([number], num_classes)
|
73 |
+
# input_data = tf.concat([random_latent_vector, one_hot_label], axis=1)
|
74 |
+
|
75 |
+
# generated_image = model.predict(input_data)
|
76 |
+
# generated_image = generated_image.reshape(28, 28)
|
77 |
+
# generated_image = tf.image.resize(generated_image[None, ...], (28, 28))[0] # Добавлено [None, ...] для добавления измерения
|
78 |
+
# return generated_image
|
79 |
+
|
80 |
+
################################################################################################
|
81 |
+
|
82 |
+
#Оформление
|
83 |
+
|
84 |
+
col1, col2, col3 = st.columns([1,5,1])
|
85 |
+
with col2:
|
86 |
+
|
87 |
+
st.title('Название модели')
|
88 |
+
|
89 |
+
col1, col2, col3 = st.columns([2,5,2])
|
90 |
+
with col2:
|
91 |
+
|
92 |
+
number = st.slider('Выберите число:', 0, 9, step=1)
|
93 |
+
|
94 |
+
################################################################################################
|
95 |
+
# Часть, отображаемая на странице
|
96 |
+
|
97 |
+
# number = st.slider('Выберите число:', 0, 9, step=1)
|
98 |
+
|
99 |
+
|
100 |
+
# #col1.subheader("Гистограмма total_bill:")
|
101 |
+
|
102 |
+
# # Генерация и отображение изображения
|
103 |
+
# generated_image = generate_image(number)
|
104 |
+
# generated_image_np = generated_image.numpy() # Преобразование в массив NumPy
|
105 |
+
# fig, ax = plt.subplots()
|
106 |
+
# ax.scatter([1, 2], [1, 2], color='black')
|
107 |
+
# plt.imshow(generated_image_np, cmap='gray')
|
108 |
+
# plt.axis('off')
|
109 |
+
# fig.set_size_inches(3, 3)
|
110 |
+
# st.pyplot(fig)
|
111 |
+
|
112 |
+
################################################################################################
|
113 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|
114 |
+
#st.markdown("<div style='text-align: center; font-size: 25px;'> ", unsafe_allow_html=True)
|