Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.py & requirements.txt #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 31 additions & 13 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
import utils


MAGE_EMOJI_URL = "https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/twitter/259/mage_1f9d9.png"


# Set page title and favicon.
st.set_page_config(
page_title="Traingenerator", page_icon=MAGE_EMOJI_URL,
page_title="Traingenerator", page_icon='🤖',
)


Expand Down Expand Up @@ -49,18 +48,37 @@ def add_to_colab(notebook):
colab_enabled = False


# Display header.
st.markdown("<br>", unsafe_allow_html=True)
st.image(MAGE_EMOJI_URL, width=80)

"""
# Code Generator for Machine Learning

[![Star](https://img.shields.io/github/stars/jrieke/traingenerator.svg?logo=github&style=social)](https://gitHub.com/jrieke/traingenerator/stargazers)
&nbsp[![Follow](https://img.shields.io/twitter/follow/jrieke?style=social)](https://www.twitter.com/jrieke)
&nbsp[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee--yellow.svg?logo=buy-me-a-coffee&logoColor=orange&style=social)](https://www.buymeacoffee.com/jrieke)
"""
st.markdown("<br>", unsafe_allow_html=True)
glowing_text_style = '''
<style>
.glowing-text {
font-family: 'Arial Black', sans-serif;
font-size: 33px;
text-align: center;
animation: glowing 2s infinite;
}

@keyframes glowing {
0% { color: #FF9933; } /* Saffron color */
10% { color: #FFD700; } /* Gold color */
20% { color: #FF1493; } /* Deep Pink */
30% { color: #00FF00; } /* Lime Green */
40% { color: #FF4500; } /* Orange Red */
50% { color: #9400D3; } /* Dark Violet */
60% { color: #00BFFF; } /* Deep Sky Blue */
70% { color: #FF69B4; } /* Hot Pink */
80% { color: #ADFF2F; } /* Green Yellow */
90% { color: #1E90FF; } /* Dodger Blue */
100% { color: #FF9933; } /* Saffron color */
}
</style>
'''

# Display the glowing text using st.markdown
st.markdown(glowing_text_style, unsafe_allow_html=True)
st.markdown(f'<p class="glowing-text">Code Generator for Machine Learning</p>', unsafe_allow_html=True)
st.image("https://github.com/software-babooi/ideal-potato-oibsip/assets/110555361/990476f8-9c47-4938-9889-87811658df1e",use_column_width=True)
"""Jumpstart your machine learning code:

1. Specify model in the sidebar *(click on **>** if closed)*
Expand Down Expand Up @@ -141,7 +159,7 @@ def add_to_colab(notebook):
# Display donwload/open buttons.
# TODO: Maybe refactor this (with some of the stuff in utils.py) to buttons.py.
st.write("") # add vertical space
col1, col2, col3 = st.beta_columns(3)
col1, col2, col3 = st.columns(3)
open_colab = col1.button("🚀 Open in Colab") # logic handled further down
with col2:
utils.download_button(code, "generated-code.py", "🐍 Download (.py)")
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Jinja2==2.8
Jinja2==3.1.2
jupytext==1.7.1
bokeh==2.2.3
streamlit==0.72.0
pandas==1.1.3
PyGithub==1.54
python-dotenv==0.15.0
bokeh==3.3.2
streamlit==1.22.0
pandas==1.5.2
PyGithub==1.59.1
python-dotenv==1.0.0