Spaces:
Running
Running
| import streamlit as st | |
| def apply_styles(): | |
| return """ | |
| <style> | |
| h1, h3 { | |
| text-align: center; | |
| } | |
| .stButton > button { | |
| background-color: #FFD700 !important; | |
| color: black !important; | |
| border: 1px solid black !important; | |
| font-weight: bold !important; | |
| width: 80% !important; | |
| margin-left: 10% !important; | |
| text-transform: uppercase !important; | |
| padding: 0.5rem 2rem !important; | |
| font-size: 1.1rem !important; | |
| } | |
| .stButton > button:hover { | |
| background-color: #F4C430 !important; /* Slightly darker yellow on hover */ | |
| } | |
| h1 { | |
| color: #2c3e50; | |
| font-size: 2.5rem; | |
| margin-bottom: 1rem; | |
| } | |
| h3 { | |
| color: #34495e; | |
| font-size: 1.3rem; | |
| font-weight: normal; | |
| margin-bottom: 2rem; | |
| } | |
| .stMarkdown { | |
| font-size: 1.1rem; | |
| } | |
| .element-container { | |
| margin-bottom: 1.5rem; | |
| } | |
| </style> | |
| """ | |
| st.markdown(""" | |
| <style> | |
| .stTextArea > label { | |
| font-size: 1.2rem; | |
| font-weight: bold; | |
| color: #2c3e50; | |
| } | |
| .stSelectbox > label { | |
| font-size: 1.2rem; | |
| font-weight: bold; | |
| color: #2c3e50; | |
| } | |
| .stSlider > label { | |
| font-size: 1.2rem; | |
| font-weight: bold; | |
| color: #2c3e50; | |
| } | |
| .stButton > button { | |
| background-color: #2c3e50; | |
| color: white; | |
| padding: 0.5rem 2rem; | |
| font-size: 1.1rem; | |
| font-weight: bold; | |
| border-radius: 5px; | |
| } | |
| .stButton > button:hover { | |
| background-color: #34495e; | |
| } | |
| h1 { | |
| color: #2c3e50; | |
| font-size: 2.5rem; | |
| margin-bottom: 1rem; | |
| } | |
| h3 { | |
| color: #34495e; | |
| font-size: 1.3rem; | |
| font-weight: normal; | |
| margin-bottom: 2rem; | |
| } | |
| .stMarkdown { | |
| font-size: 1.1rem; | |
| } | |
| .element-container { | |
| margin-bottom: 1.5rem; | |
| } | |
| </style> | |
| """, unsafe_allow_html=True) | |
| def format_story_output(story_text): | |
| return f""" | |
| <div class="story-output"> | |
| {story_text} | |
| </div> | |
| """ |