TANVEERMAKHDOOM commited on
Commit
a1d7a70
1 Parent(s): cd4cbe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -0
app.py CHANGED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Define the function that generates the game design document
4
+ def generate_document(game_environments, protagonist, antagonist):
5
+ return (
6
+ f"**Game Environments:**\n{game_environments}\n\n"
7
+ f"**Protagonist:**\n{protagonist}\n\n"
8
+ f"**Antagonist:**\n{antagonist}\n\n"
9
+ f"**Game Story:**\n"
10
+ "To be added based on the environments, protagonist, and antagonist."
11
+ )
12
+
13
+ # Streamlit app
14
+ def main():
15
+ st.title("StoryForge")
16
+
17
+ st.write(
18
+ "StoryForge is your ultimate companion for crafting comprehensive game design documents. "
19
+ "By providing structured inputs about game environments, protagonists, and antagonists, "
20
+ "StoryForge helps you organize your ideas into a clear and cohesive design document."
21
+ )
22
+
23
+ st.header("Input Details")
24
+
25
+ game_environments = st.text_area(
26
+ "Game Environments",
27
+ "Enter the different settings or worlds where the game takes place."
28
+ )
29
+
30
+ protagonist = st.text_area(
31
+ "Protagonist",
32
+ "Describe the main character of the game."
33
+ )
34
+
35
+ antagonist = st.text_area(
36
+ "Antagonist",
37
+ "Detail the main antagonist of the game."
38
+ )
39
+
40
+ if st.button("Generate Document"):
41
+ if game_environments and protagonist and antagonist:
42
+ document = generate_document(game_environments, protagonist, antagonist)
43
+ st.subheader("Generated Game Design Document")
44
+ st.markdown(document)
45
+ else:
46
+ st.error("Please fill out all fields.")
47
+
48
+ if __name__ == "__main__":
49
+ main()