Update app.py
Browse files
app.py
CHANGED
|
@@ -1,68 +1,73 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
|
| 3 |
-
# Set page configuration (only once in main.py)
|
| 4 |
-
st.set_page_config(page_title="AI Generator App", page_icon="π΅", layout="wide")
|
| 5 |
-
|
| 6 |
-
# Custom CSS to improve the appearance
|
| 7 |
-
st.markdown("""
|
| 8 |
-
<style>
|
| 9 |
-
.stApp {
|
| 10 |
-
background-image:linear-gradient(to bottom, #000000 , #0a0908, #250902, #641220);
|
| 11 |
-
font-family: 'Helvetica', sans-serif;
|
| 12 |
-
}
|
| 13 |
-
.main-title {
|
| 14 |
-
font-size: 3.5rem !important;
|
| 15 |
-
color: #f1faee;
|
| 16 |
-
text-align: center;
|
| 17 |
-
margin-bottom: 0.5rem;
|
| 18 |
-
font-weight: bold;
|
| 19 |
-
}
|
| 20 |
-
.subtitle {
|
| 21 |
-
font-size: 1.5rem;
|
| 22 |
-
color: #f1faee;
|
| 23 |
-
text-align: center;
|
| 24 |
-
margin-bottom: 3rem;
|
| 25 |
-
}
|
| 26 |
-
.stButton button {
|
| 27 |
-
background-color: #4CAF50;
|
| 28 |
-
color: white;
|
| 29 |
-
padding: 15px 32px;
|
| 30 |
-
font-size: 1.2rem;
|
| 31 |
-
margin: 10px;
|
| 32 |
-
border-radius: 12px;
|
| 33 |
-
border: none;
|
| 34 |
-
cursor: pointer;
|
| 35 |
-
transition: background-color 0.3s ease;
|
| 36 |
-
}
|
| 37 |
-
.stButton button:hover {
|
| 38 |
-
background-color: #45a049;
|
| 39 |
-
}
|
| 40 |
-
.section-title {
|
| 41 |
-
color: #fff;
|
| 42 |
-
font-size: 1.5rem;
|
| 43 |
-
margin-bottom: 1rem;
|
| 44 |
-
}
|
| 45 |
-
.section-description {
|
| 46 |
-
color: #ddd;
|
| 47 |
-
margin-bottom: 1.5rem;
|
| 48 |
-
}
|
| 49 |
-
</style>
|
| 50 |
-
""", unsafe_allow_html=True)
|
| 51 |
-
|
| 52 |
-
# Main page content
|
| 53 |
-
st.markdown("<h1 class='main-title'>π¨ AI Music and Image Generator</h1>", unsafe_allow_html=True)
|
| 54 |
-
st.markdown("<p class='subtitle'>Welcome to the AI Generator app! Use the navigation menu to switch between generating music or images based on text prompts.</p>", unsafe_allow_html=True)
|
| 55 |
-
|
| 56 |
-
# Brief description of each section
|
| 57 |
-
st.markdown("### Available Sections:")
|
| 58 |
-
col1, col2 = st.columns(2)
|
| 59 |
-
|
| 60 |
-
with col1:
|
| 61 |
-
st.markdown("<div class='section-title'>π΅ Music Generator</div>", unsafe_allow_html=True)
|
| 62 |
-
st.markdown("<div class='section-description'>Transform your ideas into music using AI.</div>", unsafe_allow_html=True)
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
# Set page configuration (only once in main.py)
|
| 4 |
+
st.set_page_config(page_title="AI Generator App", page_icon="π΅", layout="wide")
|
| 5 |
+
|
| 6 |
+
# Custom CSS to improve the appearance
|
| 7 |
+
st.markdown("""
|
| 8 |
+
<style>
|
| 9 |
+
.stApp {
|
| 10 |
+
background-image:linear-gradient(to bottom, #000000 , #0a0908, #250902, #641220);
|
| 11 |
+
font-family: 'Helvetica', sans-serif;
|
| 12 |
+
}
|
| 13 |
+
.main-title {
|
| 14 |
+
font-size: 3.5rem !important;
|
| 15 |
+
color: #f1faee;
|
| 16 |
+
text-align: center;
|
| 17 |
+
margin-bottom: 0.5rem;
|
| 18 |
+
font-weight: bold;
|
| 19 |
+
}
|
| 20 |
+
.subtitle {
|
| 21 |
+
font-size: 1.5rem;
|
| 22 |
+
color: #f1faee;
|
| 23 |
+
text-align: center;
|
| 24 |
+
margin-bottom: 3rem;
|
| 25 |
+
}
|
| 26 |
+
.stButton button {
|
| 27 |
+
background-color: #4CAF50;
|
| 28 |
+
color: white;
|
| 29 |
+
padding: 15px 32px;
|
| 30 |
+
font-size: 1.2rem;
|
| 31 |
+
margin: 10px;
|
| 32 |
+
border-radius: 12px;
|
| 33 |
+
border: none;
|
| 34 |
+
cursor: pointer;
|
| 35 |
+
transition: background-color 0.3s ease;
|
| 36 |
+
}
|
| 37 |
+
.stButton button:hover {
|
| 38 |
+
background-color: #45a049;
|
| 39 |
+
}
|
| 40 |
+
.section-title {
|
| 41 |
+
color: #fff;
|
| 42 |
+
font-size: 1.5rem;
|
| 43 |
+
margin-bottom: 1rem;
|
| 44 |
+
}
|
| 45 |
+
.section-description {
|
| 46 |
+
color: #ddd;
|
| 47 |
+
margin-bottom: 1.5rem;
|
| 48 |
+
}
|
| 49 |
+
</style>
|
| 50 |
+
""", unsafe_allow_html=True)
|
| 51 |
+
|
| 52 |
+
# Main page content
|
| 53 |
+
st.markdown("<h1 class='main-title'>π¨ AI Music and Image Generator</h1>", unsafe_allow_html=True)
|
| 54 |
+
st.markdown("<p class='subtitle'>Welcome to the AI Generator app! Use the navigation menu to switch between generating music or images based on text prompts.</p>", unsafe_allow_html=True)
|
| 55 |
+
|
| 56 |
+
# Brief description of each section
|
| 57 |
+
st.markdown("### Available Sections:")
|
| 58 |
+
col1, col2 = st.columns(2)
|
| 59 |
+
|
| 60 |
+
with col1:
|
| 61 |
+
st.markdown("<div class='section-title'>π΅ Music Generator</div>", unsafe_allow_html=True)
|
| 62 |
+
st.markdown("<div class='section-description'>Transform your ideas into music using AI.</div>", unsafe_allow_html=True)
|
| 63 |
+
music = st.button("Generate Music")
|
| 64 |
+
if music:
|
| 65 |
+
st.switch_page("pages/Music_Generator.py")
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
with col2:
|
| 69 |
+
st.markdown("<div class='section-title'>πΌοΈ Image Generator</div>", unsafe_allow_html=True)
|
| 70 |
+
st.markdown("<div class='section-description'>Generate stunning images from your text descriptions.</div>", unsafe_allow_html=True)
|
| 71 |
+
img = st.button("Generate Images")
|
| 72 |
+
if img:
|
| 73 |
+
st.switch_page("pages/Image_Generator.py")
|