Spaces:
Sleeping
Sleeping
File size: 2,193 Bytes
a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 cd416d2 a1d7a70 1554ff4 cd416d2 |
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 |
import streamlit as st
# Define the function that generates the game design document
def generate_document(game_environments, protagonist, antagonist, game_story):
return (
f"**Game Environments:**\n{game_environments}\n\n"
f"**Protagonist:**\n{protagonist}\n\n"
f"**Antagonist:**\n{antagonist}\n\n"
f"**Game Story:**\n{game_story}"
)
# Streamlit app
def main():
st.title("StoryForge")
st.write(
"StoryForge is your ultimate companion for crafting comprehensive game design documents. "
"By providing structured inputs about game environments, protagonists, and antagonists, "
"StoryForge helps you organize your ideas into a clear and cohesive design document."
)
st.header("Input Details")
# Input fields for the user
game_environments = st.text_area(
"Game Environments",
"Enter the different settings or worlds where the game takes place."
)
protagonist = st.text_area(
"Protagonist",
"Describe the main character of the game."
)
antagonist = st.text_area(
"Antagonist",
"Detail the main antagonist of the game."
)
game_story = st.text_area(
"Game Story",
"Provide an overview of the game's narrative arc."
)
if st.button("Generate Document"):
if game_environments and protagonist and antagonist and game_story:
document = generate_document(game_environments, protagonist, antagonist, game_story)
st.subheader("Generated Game Design Document")
# Two-column layout
col1, col2 = st.columns(2)
with col1:
st.write("**Game Environments:**")
st.write(game_environments)
st.write("**Protagonist:**")
st.write(protagonist)
with col2:
st.write("**Antagonist:**")
st.write(antagonist)
st.write("**Game Story:**")
st.write(game_story)
else:
st.error("Please fill out all fields.")
if __name__ == "__main__":
main()
|