Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,15 +97,15 @@ def generate_game_story(environment, protagonist, antagonist):
|
|
| 97 |
)
|
| 98 |
return message.content[0].text
|
| 99 |
|
| 100 |
-
# App Title
|
| 101 |
-
st.
|
| 102 |
|
| 103 |
# App Description
|
| 104 |
-
st.
|
| 105 |
|
| 106 |
# Sidebar Inputs
|
| 107 |
with st.sidebar:
|
| 108 |
-
st.
|
| 109 |
game_environment = st.text_input("Game Environment", "Describe the setting of your game")
|
| 110 |
protagonist = st.text_input("Protagonist", "Describe the main character")
|
| 111 |
antagonist = st.text_input("Antagonist", "Describe the main villain or opposing force")
|
|
@@ -125,30 +125,34 @@ with st.sidebar:
|
|
| 125 |
# Layout with two columns
|
| 126 |
col1, col2 = st.columns(2)
|
| 127 |
|
|
|
|
| 128 |
with col1:
|
| 129 |
-
st.
|
| 130 |
if 'env_description' in st.session_state:
|
| 131 |
st.write(st.session_state.env_description)
|
| 132 |
else:
|
| 133 |
st.write(game_environment)
|
| 134 |
|
|
|
|
| 135 |
with col2:
|
| 136 |
-
st.
|
| 137 |
if 'game_story' in st.session_state:
|
| 138 |
st.write(st.session_state.game_story)
|
| 139 |
else:
|
| 140 |
st.write("Your game story will be generated based on the inputs provided.")
|
| 141 |
|
|
|
|
| 142 |
with col1:
|
| 143 |
-
st.
|
| 144 |
if 'protagonist_description' in st.session_state:
|
| 145 |
st.write(st.session_state.protagonist_description)
|
| 146 |
else:
|
| 147 |
st.write(protagonist)
|
| 148 |
|
|
|
|
| 149 |
with col2:
|
| 150 |
-
st.
|
| 151 |
if 'antagonist_description' in st.session_state:
|
| 152 |
st.write(st.session_state.antagonist_description)
|
| 153 |
else:
|
| 154 |
-
st.write(antagonist)
|
|
|
|
| 97 |
)
|
| 98 |
return message.content[0].text
|
| 99 |
|
| 100 |
+
# App Title with a bit of styling
|
| 101 |
+
st.markdown("<h1 style='text-align: center; color: #4CAF50;'>StoryScribe</h1>", unsafe_allow_html=True)
|
| 102 |
|
| 103 |
# App Description
|
| 104 |
+
st.markdown("<p style='text-align: center; color: #888;'>StoryForge helps game developers generate comprehensive Game Design Documents. Input details about your game environment, protagonist, and antagonist to create a structured design document.</p>", unsafe_allow_html=True)
|
| 105 |
|
| 106 |
# Sidebar Inputs
|
| 107 |
with st.sidebar:
|
| 108 |
+
st.markdown("<h2 style='color: #FF6347;'>Game Details</h2>", unsafe_allow_html=True)
|
| 109 |
game_environment = st.text_input("Game Environment", "Describe the setting of your game")
|
| 110 |
protagonist = st.text_input("Protagonist", "Describe the main character")
|
| 111 |
antagonist = st.text_input("Antagonist", "Describe the main villain or opposing force")
|
|
|
|
| 125 |
# Layout with two columns
|
| 126 |
col1, col2 = st.columns(2)
|
| 127 |
|
| 128 |
+
# Game Environment
|
| 129 |
with col1:
|
| 130 |
+
st.markdown("<h2 style='color: #007BFF;'>Game Environment</h2>", unsafe_allow_html=True)
|
| 131 |
if 'env_description' in st.session_state:
|
| 132 |
st.write(st.session_state.env_description)
|
| 133 |
else:
|
| 134 |
st.write(game_environment)
|
| 135 |
|
| 136 |
+
# Game Story
|
| 137 |
with col2:
|
| 138 |
+
st.markdown("<h2 style='color: #007BFF;'>Game Story</h2>", unsafe_allow_html=True)
|
| 139 |
if 'game_story' in st.session_state:
|
| 140 |
st.write(st.session_state.game_story)
|
| 141 |
else:
|
| 142 |
st.write("Your game story will be generated based on the inputs provided.")
|
| 143 |
|
| 144 |
+
# Protagonist
|
| 145 |
with col1:
|
| 146 |
+
st.markdown("<h2 style='color: #FF4500;'>Protagonist</h2>", unsafe_allow_html=True)
|
| 147 |
if 'protagonist_description' in st.session_state:
|
| 148 |
st.write(st.session_state.protagonist_description)
|
| 149 |
else:
|
| 150 |
st.write(protagonist)
|
| 151 |
|
| 152 |
+
# Antagonist
|
| 153 |
with col2:
|
| 154 |
+
st.markdown("<h2 style='color: #FF4500;'>Antagonist</h2>", unsafe_allow_html=True)
|
| 155 |
if 'antagonist_description' in st.session_state:
|
| 156 |
st.write(st.session_state.antagonist_description)
|
| 157 |
else:
|
| 158 |
+
st.write(antagonist)
|