{"id":344358,"date":"2023-01-23T21:01:33","date_gmt":"2023-01-23T21:01:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344358"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344358","title":{"rendered":"<span>\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Streamlit \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/456\/9dc\/8e4\/4569dc8e454451bd072ff8cb618cf123.png\" width=\"780\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/456\/9dc\/8e4\/4569dc8e454451bd072ff8cb618cf123.png\"\/><figcaption><\/figcaption><\/figure>\n<p><em>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438: \u0420\u0443\u0441\u0442\u0435\u043c \u0413\u043e\u0440\u0448\u0435\u043d\u0435\u0432<\/em><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 Streamlit \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0443\u043a\u0430 \u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u044b\u0436\u0438\u043b \u0431\u044b \u043a\u0442\u043e-\u0442\u043e \u043d\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u043e\u0449\u044c Streamlit \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<h3>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u044d\u0442\u0443 \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043b\u0443\u0447\u0448\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u044b.. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430, \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435.<\/p>\n<h4>\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438<\/h4>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0437\u0434\u0435\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e:<\/p>\n<pre><code>cat &lt;&lt; EOF > \/root\/test.py  import streamlit as st  import pandas as pd  import pickle  EOF<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ab5\/18f\/330\/ab518f330942806413777e6957445f75.png\" width=\"433\" height=\"145\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ab5\/18f\/330\/ab518f330942806413777e6957445f75.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pickle, \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c:<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py  filename = '\/usr\/local\/bin\/titanic_model.sav'  model = pickle.load(open(filename, 'rb'))  df = pd.read_csv('https:\/\/raw.githubusercontent.com\/Stijnvhd\/Streamlit_Course\/main\/First Exercise\/second.csv')  st.write(df)  EOF<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0bf\/a19\/d31\/0bfa19d3178e11adf95bb9ef493de681.png\" width=\"1229\" height=\"272\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0bf\/a19\/d31\/0bfa19d3178e11adf95bb9ef493de681.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432:<\/p>\n<pre><code>streamlit run \/root\/test.py --server.port 80<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7d1\/8a3\/408\/7d18a340882e2622bc585f60cc108e59.png\" width=\"1224\" height=\"304\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7d1\/8a3\/408\/7d18a340882e2622bc585f60cc108e59.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/70d\/be6\/a56\/70dbe6a56c4aca6e3b6b1d61e08fe1de.png\" width=\"1190\" height=\"640\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70d\/be6\/a56\/70dbe6a56c4aca6e3b6b1d61e08fe1de.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0430\u043a\u0435\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u041e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445, \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043b\u043e\u043a\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u0435\u0439. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 Ctrl + C \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py titles = ('Not applicable', 'Dr.', 'Rev.',           'Miss.', 'Master.', 'Don.', 'Mme.',           'Major.', 'Lady.', 'Sir.', 'Mlle.', 'Col.', 'Capt.', 'Countess.', 'Jonkheer.')  ports_range = ('Queenstown, Ireland', 'Southampton, U.K.')  Pclass = (1, 2, 3)  st.markdown(\"\"\" &lt;style> .big-font {     font-size:60px !important;       color :#C7BACC !important;                font-family: 'Roboto', sans-serif; } .colored-font {     font-size:50px !important;     color: grey !important;     font-weight: bold; } &lt;\/style> \"\"\", unsafe_allow_html=True)  EOF<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b6\/593\/f3a\/3b6593f3a70f4f1ea492fe1056cc785a.png\" width=\"1202\" height=\"707\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b6\/593\/f3a\/3b6593f3a70f4f1ea492fe1056cc785a.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0431\u043e\u0440\u043d\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c, \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u044b\u0431\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412\u044b \u0431\u044b \u0432\u044b\u0436\u0438\u043b\u0438 \u043d\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435? \u041d\u0443, \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0437\u043d\u0430\u0442\u044c!<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py  st.markdown('&lt;p class=\"big-font\">Would you make it if you were on the Titanic? Describe yourself using the lefthand menu and find out. &lt;\/p>', unsafe_allow_html=True)  st.sidebar.title('Describe yourself')  title = st.sidebar.selectbox('Your title', titles) Title_Unusual = 0 if title == \"Not applicable\" else 1  gender = st.sidebar.radio('Sex', ('Male', 'Female')) Sex = 0 if gender == 'Male' else 1  Age = st.sidebar.slider('Age', 0, 90, 1)  Pclass = st.sidebar.radio('Class', Pclass) fare_range = df.loc[df['Pclass'] == Pclass, 'Fare']  Cabin_Known = st.sidebar.radio('Cabin', (0, 1))  ports = st.sidebar.radio('Port of departure', ports_range) Embarked_Q = 1 if ports == 'Queenstown, Ireland' else 0 Embarked_S = 1 if ports == \"Southampton, U.K.\" else 0  Fare = st.sidebar.slider('How much was your ticket (\u00a3)?', min(fare_range), max(fare_range)) SibSp = st.sidebar.slider(\"How many siblings are on the Titanic with you?\", 0, 10) Parch = st.sidebar.slider(\"Parents or children with you?\", 0, 10) prediction_inp = [Pclass] + [Sex] + [Age] + [SibSp] + [Parch] + [Fare] + \\                  [Title_Unusual] + [Cabin_Known] + [Embarked_Q] + [Embarked_S] EOF<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/946\/947\/804\/946947804621ffa10e8c0a681b8f4f54.png\" width=\"1238\" height=\"640\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/946\/947\/804\/946947804621ffa10e8c0a681b8f4f54.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/318\/c5b\/b41\/318c5bb418cd275a6e0c4ddd2180d1d7.png\" width=\"1228\" height=\"160\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/318\/c5b\/b41\/318c5bb418cd275a6e0c4ddd2180d1d7.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432<\/p>\n<pre><code>streamlit run \/root\/test.py --server.port 80<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a1\/814\/c06\/6a1814c06c633c0ce862baf87d1e91e2.png\" width=\"1173\" height=\"257\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a1\/814\/c06\/6a1814c06c633c0ce862baf87d1e91e2.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a21\/cd7\/bdc\/a21cd7bdcd54ebdfbdc088dd0bbaea87.png\" width=\"1600\" height=\"746\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a21\/cd7\/bdc\/a21cd7bdcd54ebdfbdc088dd0bbaea87.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db7\/83d\/d49\/db783dd49a4d7411049b6ef878bb146a.png\" width=\"1600\" height=\"742\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db7\/83d\/d49\/db783dd49a4d7411049b6ef878bb146a.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0435\u0434\u0438\u043a\u0446\u0438\u0438<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043a\u043e\u043d\u0446\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0445\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0432\u044b\u0436\u0438\u0432\u0435\u0442 \u043a\u0442\u043e-\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442, \u0438 \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0441\u043e\u043e\u0431\u0449\u0438\u0442 \u043d\u0430\u043c \u043e\u0431 \u044d\u0442\u043e\u043c<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 Ctrl + C \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434.<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py survial = model.predict_proba([prediction_inp])[0,1] survial = round(survial,2)  if survial*100 >= 50:      fate = \"Survive\"     st.write(survial)     st.write('You will likely  '+ fate) else:     fate = \"Die\"     st.write(survial)     st.write('You will likely  '+ fate) EOF<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/227\/ce0\/c45\/227ce0c455c001d25115de55bc3aa890.png\" width=\"749\" height=\"371\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/227\/ce0\/c45\/227ce0c455c001d25115de55bc3aa890.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/441\/abe\/6d6\/441abe6d64a3aceae1338719550261c5.png\" width=\"1600\" height=\"774\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/441\/abe\/6d6\/441abe6d64a3aceae1338719550261c5.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043d\u0435 \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e)<\/p>\n<p>\u0412\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u0435\u0442 \u0438\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445!<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/p>\n<pre><code>cat &lt;&lt; EOF > \/root\/test.py import streamlit as st import pandas as pd import pickle  filename = '\/usr\/local\/bin\/titanic_model.sav' model = pickle.load(open(filename, 'rb'))  df = pd.read_csv('https:\/\/raw.githubusercontent.com\/Stijnvhd\/Streamlit_Course\/main\/First%20Exercise\/second.csv')  st.write(df)  titles = ('Not applicable', 'Dr.', 'Rev.',           'Miss.', 'Master.', 'Don.', 'Mme.',           'Major.', 'Lady.', 'Sir.', 'Mlle.', 'Col.', 'Capt.', 'Countess.', 'Jonkheer.')  ports_range = ('Queenstown, Ireland', 'Southampton, U.K.')  Pclass = (1, 2, 3)  st.markdown(\"\"\" &lt;style> .big-font {     font-size:60px !important;       color :#C7BACC !important;                font-family: 'Roboto', sans-serif; } .colored-font {     font-size:50px !important;     color: grey !important;     font-weight: bold; } &lt;\/style> \"\"\", unsafe_allow_html=True)  st.markdown('&lt;p class=\"big-font\">Would you make it if you were on the Titanic? Describe yourself using the lefthand menu and find out. &lt;\/p>', unsafe_allow_html=True)  st.sidebar.title('Describe yourself')  title = st.sidebar.selectbox('Your title', titles) Title_Unusual = 0 if title == \"Not applicable\" else 1  gender = st.sidebar.radio('Sex', ('Male', 'Female')) Sex = 0 if gender == 'Male' else 1  Age = st.sidebar.slider('Age', 0, 90, 1)  Pclass = st.sidebar.radio('Class', Pclass) fare_range = df.loc[df['Pclass'] == Pclass, 'Fare']  Cabin_Known = st.sidebar.radio('Cabin', (0, 1))  ports = st.sidebar.radio('Port of departure', ports_range) Embarked_Q = 1 if ports == 'Queenstown, Ireland' else 0 Embarked_S = 1 if ports == \"Southampton, U.K.\" else 0  Fare = st.sidebar.slider('How much was your ticket (\u00a3)?', min(fare_range), max(fare_range)) SibSp = st.sidebar.slider(\"How many siblings are on the Titanic with you?\", 0, 10) Parch = st.sidebar.slider(\"Parents or children with you?\", 0, 10) prediction_inp = [Pclass] + [Sex] + [Age] + [SibSp] + [Parch] + [Fare] + \\                  [Title_Unusual] + [Cabin_Known] + [Embarked_Q] + [Embarked_S]  survial = model.predict_proba([prediction_inp])[0,1] survial = round(survial,2)  if survial*100 >= 50:      fate = \"Survive\"     st.write(survial)     st.write('You will likely  '+ fate) else:     fate = \"Die\"     st.write(survial)     st.write('You will likely  '+ fate) EOF<\/code><\/pre>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 ML \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 Pandas\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0432 Otus. \u041d\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043e\u0431\u0441\u0443\u0434\u044f\u0442, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043a\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python, \u043a\u0430\u043a \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u0430 \u0432 ML. \u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/otus.pw\/8ipx\/\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435.<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/712352\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/712352\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><em>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438: \u0420\u0443\u0441\u0442\u0435\u043c \u0413\u043e\u0440\u0448\u0435\u043d\u0435\u0432<\/em><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 Streamlit \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0443\u043a\u0430 \u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u044b\u0436\u0438\u043b \u0431\u044b \u043a\u0442\u043e-\u0442\u043e \u043d\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u043e\u0449\u044c Streamlit \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <\/p>\n<h3>\u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u044d\u0442\u0443 \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043b\u0443\u0447\u0448\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u044b.. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430, \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435.<\/p>\n<h4>\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438<\/h4>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0437\u0434\u0435\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e:<\/p>\n<pre><code>cat &lt;&lt; EOF > \/root\/test.py  import streamlit as st  import pandas as pd  import pickle  EOF<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pickle, \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c:<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py  filename = '\/usr\/local\/bin\/titanic_model.sav'  model = pickle.load(open(filename, 'rb'))  df = pd.read_csv('https:\/\/raw.githubusercontent.com\/Stijnvhd\/Streamlit_Course\/main\/First Exercise\/second.csv')  st.write(df)  EOF<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432:<\/p>\n<pre><code>streamlit run \/root\/test.py --server.port 80<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0430\u043a\u0435\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e. \u041e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445, \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435.<\/p>\n<p>\u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043b\u043e\u043a\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u0435\u0439. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 Ctrl + C \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py titles = ('Not applicable', 'Dr.', 'Rev.',           'Miss.', 'Master.', 'Don.', 'Mme.',           'Major.', 'Lady.', 'Sir.', 'Mlle.', 'Col.', 'Capt.', 'Countess.', 'Jonkheer.')  ports_range = ('Queenstown, Ireland', 'Southampton, U.K.')  Pclass = (1, 2, 3)  st.markdown(\"\"\" &lt;style> .big-font {     font-size:60px !important;       color :#C7BACC !important;                font-family: 'Roboto', sans-serif; } .colored-font {     font-size:50px !important;     color: grey !important;     font-weight: bold; } &lt;\/style> \"\"\", unsafe_allow_html=True)  EOF<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0431\u043e\u0440\u043d\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c, \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u044b\u0431\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412\u044b \u0431\u044b \u0432\u044b\u0436\u0438\u043b\u0438 \u043d\u0430 \u0422\u0438\u0442\u0430\u043d\u0438\u043a\u0435? \u041d\u0443, \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0437\u043d\u0430\u0442\u044c!<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py  st.markdown('&lt;p class=\"big-font\">Would you make it if you were on the Titanic? Describe yourself using the lefthand menu and find out. &lt;\/p>', unsafe_allow_html=True)  st.sidebar.title('Describe yourself')  title = st.sidebar.selectbox('Your title', titles) Title_Unusual = 0 if title == \"Not applicable\" else 1  gender = st.sidebar.radio('Sex', ('Male', 'Female')) Sex = 0 if gender == 'Male' else 1  Age = st.sidebar.slider('Age', 0, 90, 1)  Pclass = st.sidebar.radio('Class', Pclass) fare_range = df.loc[df['Pclass'] == Pclass, 'Fare']  Cabin_Known = st.sidebar.radio('Cabin', (0, 1))  ports = st.sidebar.radio('Port of departure', ports_range) Embarked_Q = 1 if ports == 'Queenstown, Ireland' else 0 Embarked_S = 1 if ports == \"Southampton, U.K.\" else 0  Fare = st.sidebar.slider('How much was your ticket (\u00a3)?', min(fare_range), max(fare_range)) SibSp = st.sidebar.slider(\"How many siblings are on the Titanic with you?\", 0, 10) Parch = st.sidebar.slider(\"Parents or children with you?\", 0, 10) prediction_inp = [Pclass] + [Sex] + [Age] + [SibSp] + [Parch] + [Fare] + \\                  [Title_Unusual] + [Cabin_Known] + [Embarked_Q] + [Embarked_S] EOF<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432<\/p>\n<pre><code>streamlit run \/root\/test.py --server.port 80<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0435\u0434\u0438\u043a\u0446\u0438\u0438<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043a\u043e\u043d\u0446\u0435 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0445\u00a0 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0432\u044b\u0436\u0438\u0432\u0435\u0442 \u043a\u0442\u043e-\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442, \u0438 \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0441\u043e\u043e\u0431\u0449\u0438\u0442 \u043d\u0430\u043c \u043e\u0431 \u044d\u0442\u043e\u043c<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 Ctrl + C \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434.<\/p>\n<pre><code>cat &lt;&lt; EOF >> \/root\/test.py survial = model.predict_proba([prediction_inp])[0,1] survial = round(survial,2)  if survial*100 >= 50:      fate = \"Survive\"     st.write(survial)     st.write('You will likely  '+ fate) else:     fate = \"Die\"     st.write(survial)     st.write('You will likely  '+ fate) EOF<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043d\u0435 \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e)<\/p>\n<p>\u0412\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u0435\u0442 \u0438\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445!<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/p>\n<pre><code>cat &lt;&lt; EOF > \/root\/test.py import streamlit as st import pandas as pd import pickle  filename = '\/usr\/local\/bin\/titanic_model.sav' model = pickle.load(open(filename, 'rb'))  df = pd.read_csv('https:\/\/raw.githubusercontent.com\/Stijnvhd\/Streamlit_Course\/main\/First%20Exercise\/second.csv')  st.write(df)  titles = ('Not applicable', 'Dr.', 'Rev.',           'Miss.', 'Master.', 'Don.', 'Mme.',           'Major.', 'Lady.', 'Sir.', 'Mlle.', 'Col.', 'Capt.', 'Countess.', 'Jonkheer.')  ports_range = ('Queenstown, Ireland', 'Southampton, U.K.')  Pclass = (1, 2, 3)  st.markdown(\"\"\" &lt;style> .big-font {     font-size:60px !important;       color :#C7BACC !important;                font-family: 'Roboto', sans-serif; } .colored-font {     font-size:50px !important;     color: grey !important;     font-weight: bold; } &lt;\/style> \"\"\", unsafe_allow_html=True)  st.markdown('&lt;p class=\"big-font\">Would you make it if you were on the Titanic? Describe yourself using the lefthand menu and find out. &lt;\/p>', unsafe_allow_html=True)  st.sidebar.title('Describe yourself')  title = st.sidebar.selectbox('Your title', titles) Title_Unusual = 0 if title == \"Not applicable\" else 1  gender = st.sidebar.radio('Sex', ('Male', 'Female')) Sex = 0 if gender == 'Male' else 1  Age = st.sidebar.slider('Age', 0, 90, 1)  Pclass = st.sidebar.radio('Class', Pclass) fare_range = df.loc[df['Pclass'] == Pclass, 'Fare']  Cabin_Known = st.sidebar.radio('Cabin', (0, 1))  ports = st.sidebar.radio('Port of departure', ports_range) Embarked_Q = 1 if ports == 'Queenstown, Ireland' else 0 Embarked_S = 1 if ports == \"Southampton, U.K.\" else 0  Fare = st.sidebar.slider('How much was your ticket (\u00a3)?', min(fare_range), max(fare_range)) SibSp = st.sidebar.slider(\"How many siblings are on the Titanic with you?\", 0, 10) Parch = st.sidebar.slider(\"Parents or children with you?\", 0, 10) prediction_inp = [Pclass] + [Sex] + [Age] + [SibSp] + [Parch] + [Fare] + \\                  [Title_Unusual] + [Cabin_Known] + [Embarked_Q] + [Embarked_S]  survial = model.predict_proba([prediction_inp])[0,1] survial = round(survial,2)  if survial*100 >= 50:      fate = \"Survive\"     st.write(survial)     st.write('You will likely  '+ fate) else:     fate = \"Die\"     st.write(survial)     st.write('You will likely  '+ fate) EOF<\/code><\/pre>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 ML \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u041f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 Pandas\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0432 Otus. \u041d\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043e\u0431\u0441\u0443\u0434\u044f\u0442, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438, \u043a\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python, \u043a\u0430\u043a \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u0430 \u0432 ML. \u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/otus.pw\/8ipx\/\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435.<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/712352\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/712352\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-344358","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=344358"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344358\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}