-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
252 lines (241 loc) · 12.9 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
import streamlit as st
from streamlit_option_menu import option_menu
import pandas as pd
import requests
from constants import EMAIL_API
from projects import day1, day2, day3, day4, day5, day6, day7, day8, day9, day10, day11, day12, day13, day14, day15, day16, day17, day18, day19, day20, day21, day22, day23, day24, day25, day26, day27, day28, day29, day30, day31
# Set Page Config
st.set_page_config(
page_title = 'DataFlow App',
page_icon = '📊',
layout = 'wide',
initial_sidebar_state = 'auto',
)
# Home Page Content
def main():
st.title('31 Days DS/ML Challenge')
st.write('''
[![Star](https://img.shields.io/github/stars/silvermete0r/31github.svg?logo=github&style=flat-square)](https://github.com/silvermete0r/31github)
[![Fork](https://img.shields.io/github/forks/silvermete0r/31github.svg?logo=github&style=flat-square)](https://github.com/silvermete0r/31github)
[![Watch](https://img.shields.io/github/watchers/silvermete0r/31github.svg?logo=github&style=flat-square)](https://github.com/silvermete0r/31github)
[![Follow](https://img.shields.io/github/followers/silvermete0r.svg?logo=github&style=flat-square)](https://github.com/silvermete0r/31github)
[![License](https://img.shields.io/github/license/silvermete0r/31github.svg?logo=github&style=flat-square)](https://github.com/silvermete0r/31github)
''')
st.write('👋 My name is Arman, and I\'m very interested in Data Science and Machine Learning!')
st.write('📚 I\'m currently learning `Data Science` and `Machine Learning`.')
st.write('👨💻 All of my projects are available at [my GitHub](https://github.com/silvermete0r)')
st.subheader('My Projects')
st.table({
'Project': {
'Day_#1': '🏀 NBA Player Stats Explorer',
'Day_#2': '📈 Stocks Price Web App',
'Day_#3': '🧰 Streamlit Toolkit',
'Day_#4': '💎 No-Code ML Web App based on XGBoostRegressor',
'Day_#5': '🗃️ Excel & CSV Files Multi Merger',
'Day_#6': '📊 Machine Learning Model Performance Calculator',
'Day_#7': '🖼️ Image Quality Enhancement Web App',
'Day_#8': '😺 Github Profile Data Analyzer Web App',
'Day_#9': '🧑 Face Recognition Web App',
'Day_#10': '💡 Multi-Object Classifier Web App',
'Day_#11': '👾 Tensorflow Image Classification DL Model Training Baseline',
'Day_#12': '🌸 Tensorflow Simple Iris Classification App',
'Day_#13': '🏠 Tensorflow Regression Model Training Based on Boston Housing Dataset',
'Day_#14': '📝 Text Summarization using HuggingFace Transformers',
'Day_#15': '📝 Text Sentiment Analysis using HuggingFace Transformers',
'Day_#16': '📝 Text Completion using HuggingFace Transformers',
'Day_#17': '📝 Named Entity Recognition (NER) using BERT model from HuggingFace',
'Day_#18': '📝 Text English to French Language Translation App',
'Day_#19': '📷 Instagram Analytics Web App',
'Day_#20': '🥮 Cryptocurrency Analytics Web App',
'Day_#21': '💰 Data Scientists Salary Analysis',
'Day_#22': '🧹 Image Background Remover Web App',
'Day_#23': '🛠️ QazNLTK - kazakh language processing library based Web App',
'Day_#24': '📰 HackerNews Streamlit App',
'Day_#25': '📜 Certificate of Completion Generator',
'Day_#26': '🗺️ Streamlit Maps Web App',
'Day_#27': '⏰ Time Series Forecasting with NeuralProphet',
'Day_#28': '⚙️ Optuna - Auto Hyperparameter Tuning WebApp',
'Day_#29': '🧠 Brain Tumor Detection using TensorFlow',
'Day_#30': '📚 Storytelling with Data Visualization using `ipyvizzu`',
'Day_#31': '🎄 Happy New Year 2024 Streamlit App!',
},
'Description': {
'Day_#1': 'This app analyze data about NBA Basketball Player Stats in Regular Seasons! Data taken from official resource using web scrapping!',
'Day_#2': 'This app retrieves the list of the S&P 500 from Wikipedia and Analyze this companies stats using yfinance!',
'Day_#3': 'This app provides fully-explained useful cheatsheet for Streamlit Framework!',
'Day_#4': 'This app provides a no-code web interface to use XGBoostRegressor for training & testing Machine Learning Models based on various datasets.',
'Day_#5': 'This app merges multiple excel & csv files into one file.',
'Day_#6': 'This app evaluates the performance of machine learning models using various metrics.',
'Day_#7': 'This app enhances the quality of an image using various techniques.',
'Day_#8': 'This app analyzes the data of any Github profile using Github API.',
'Day_#9': 'This app detects faces in uploaded images using Haar Cascades.',
'Day_#10': 'This app predicts the class of different objects in an image using a pre-trained MobileNetV2 model.',
'Day_#11': 'This app trains a simple CNN model on the MNIST dataset using Tensorflow.',
'Day_#12': 'This app demonstrates a simple TensorFlow Iris classification model using the Sklearn Iris dataset.',
'Day_#13': 'This app demonstrates a simple Tensorflow regression model using the Boston Housing dataset.',
'Day_#14': 'This app is a simple text summarization app using HuggingFace Transformers.',
'Day_#15': 'This app is a simple text sentiment analysis app using `BERT` model from HuggingFace Transformers.',
'Day_#16': 'This app is a simple text completion app using GPT-2 model from HuggingFace Transformers.',
'Day_#17': 'This app helps to identify the entities in a given text. The `bert-base-NER` model used from HuggingFace.',
'Day_#18': 'This app uses the `Helsinki-NLP/opus-mt-en-fr` model to translate English text to French.',
'Day_#19': 'This app uses the `instaloader` library to download Instagram profile data.',
'Day_#20': 'This app is cryptocurrency analytics dashboard that allows you to analyze price, volume, and volatility of different cryptocurrencies.',
'Day_#21': 'This app shows how to use Streamlit to create charts and plots for data visualization on the example of Data Scientists Salary Analysis.',
'Day_#22': 'This app removes the background of an image using a python `rembg` module.',
'Day_#23': 'This app show the basic usage of `QazNLTK` library.',
'Day_#24': 'This app is a clone of HackerNews in Streamlit UI.',
'Day_#25': 'This app is a simple certificate of completion generator using `OpenCV` and `Pillow`.',
'Day_#26': 'This app is a demo of the Streamlit Maps functionality.',
'Day_#27': 'This app is a demo of Time Series Forecasting with NeuralProphet.',
'Day_#28': 'This app is a demo of Optuna - Auto Hyperparameter Tuning.',
'Day_#29': 'This app is a demo of Brain Tumor Detection using TensorFlow.',
'Day_#30': 'This app is a simple example of how to use `ipyvizzu` to create interactive data visualization.',
'Day_#31': 'This app is a last app for 2023 Github 31 Days of Streamlit Challenge.',
},
'Reference': {
'Day_#1': 'Data Professor',
'Day_#2': 'Data Professor',
'Day_#3': 'Streamlit Docs',
'Day_#4': 'Data Professor',
'Day_#5': 'Data Professor',
'Day_#6': 'Data Professor',
'Day_#7': 'OpenCV Docs',
'Day_#8': 'Github API Docs',
'Day_#9': 'OpenCV Haar Cascades',
'Day_#10': 'MobileNetV2',
'Day_#11': 'Tensorflow Guide',
'Day_#12': 'Tensorflow Guide',
'Day_#13': 'Tensorflow Guide',
'Day_#14': 'HuggingFace Transformers',
'Day_#15': 'HuggingFace Transformers',
'Day_#16': 'HuggingFace Transformers',
'Day_#17': 'HuggingFace Transformers',
'Day_#18': 'HuggingFace Transformers',
'Day_#19': 'Instaloader',
'Day_#20': 'Cryptocompare API',
'Day_#21': 'Streamlit Docs',
'Day_#22': 'tyler-simons/BackgroundRemoval',
'Day_#23': 'QazNLTK',
'Day_#24': 'HackerNews API',
'Day_#25': 'OpenCV Docs',
'Day_#26': 'Streamlit Docs',
'Day_#27': 'NeuralProphet',
'Day_#28': 'Optuna Docs',
'Day_#29': 'Tensorflow Guide',
'Day_#30': 'Data Professor',
'Day_#31': 'Streamlit Community',
},
})
st.subheader('Contact Me')
def send_message(user_name, user_email, user_message):
return requests.post(
"https://api.mailgun.net/v3/sandboxebd1ff2187ca4bf6a7610daf43c30c0a.mailgun.org/messages",
auth=("api", EMAIL_API),
data={"from": "Mailgun Sandbox <postmaster@sandboxebd1ff2187ca4bf6a7610daf43c30c0a.mailgun.org>",
"to": "Supwithproject <supwithproject@gmail.com>",
"subject": f"31Days Dataflow User Message from {user_name} <{user_email}>",
"text": user_message})
with st.form(key='contact_form', clear_on_submit=True):
user_name = st.text_input('Name')
user_email = st.text_input('Email')
user_message = st.text_area('Message')
submitted = st.form_submit_button('Submit')
if submitted:
try:
send_message(user_name, user_email, user_message)
st.success('Thank you for your message! I will get back to you as soon as possible.')
except Exception as e:
st.error('Something went wrong... Please try again.')
st.error(e)
col1, col2, col3 = st.columns(3)
col1.write('✈️ Telegram: [@silvermete0r](https://t.me/silvermete0r)')
col2.write('📷 Instagram: [@grembim](https://www.instagram.com/grembim)')
col3.write('🔗 Taplink: [@grembim](https://one.link/grembim)')
# Multipage WebApp Design
class MultiApp:
def __init__(self):
self.apps = []
def add_app(self, title, function):
self.apps.append({
'title': title,
'function': function
})
def run():
with st.sidebar:
# Set Sidebar Content
st.sidebar.image('media/logo.png', use_column_width=True)
app = option_menu(
menu_title = None,
options = ['Main', 'Day #1', 'Day #2', 'Day #3', 'Day #4', 'Day #5', 'Day #6', 'Day #7', 'Day #8', 'Day #9', 'Day #10', 'Day #11', 'Day #12', 'Day #13', 'Day #14', 'Day #15', 'Day #16', 'Day #17', 'Day #18', 'Day #19', 'Day #20', 'Day #21', 'Day #22', 'Day #23', 'Day #24', 'Day #25', 'Day #26', 'Day #27', 'Day #28', 'Day #29', 'Day #30', 'Day #31'],
icons = ['menu-up'],
menu_icon = 'chat-text-fill',
default_index = 0
)
st.info('31 Days Educational Challenge for Data Science / Machine Learning for the program [GrowthHungry](https://www.growthhungry.life/challenge) Challenge.')
st.caption('Made with ❤️ by [DataFlow](https://dataflow.kz) team.')
# Set Main Content
if app == 'Main':
main()
if app == 'Day #1':
day1.app()
if app == 'Day #2':
day2.app()
if app == 'Day #3':
day3.app()
if app == 'Day #4':
day4.app()
if app == 'Day #5':
day5.app()
if app == 'Day #6':
day6.app()
if app == 'Day #7':
day7.app()
if app == 'Day #8':
day8.app()
if app == 'Day #9':
day9.app()
if app == 'Day #10':
day10.app()
if app == 'Day #11':
day11.app()
if app == 'Day #12':
day12.app()
if app == 'Day #13':
day13.app()
if app == 'Day #14':
day14.app()
if app == 'Day #15':
day15.app()
if app == 'Day #16':
day16.app()
if app == 'Day #17':
day17.app()
if app == 'Day #18':
day18.app()
if app == 'Day #19':
day19.app()
if app == 'Day #20':
day20.app()
if app == 'Day #21':
day21.app()
if app == 'Day #22':
day22.app()
if app == 'Day #23':
day23.app()
if app == 'Day #24':
day24.app()
if app == 'Day #25':
day25.app()
if app == 'Day #26':
day26.app()
if app == 'Day #27':
day27.app()
if app == 'Day #28':
day28.app()
if app == 'Day #29':
day29.app()
if app == 'Day #30':
day30.app()
if app == 'Day #31':
day31.app()
run()