Spaces:
Runtime error
Runtime error
cha0smagick
commited on
Commit
•
102dee4
1
Parent(s):
5e4549f
Update app.py
Browse files
app.py
CHANGED
@@ -1,179 +1,191 @@
|
|
1 |
-
import random
|
2 |
import streamlit as st
|
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 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from PIL import Image
|
3 |
+
|
4 |
+
# Define the character sheet image
|
5 |
+
image = Image.open("mage_character_sheet.png")
|
6 |
+
|
7 |
+
# Set the page title
|
8 |
+
st.set_page_config(
|
9 |
+
page_title="Mage: The Ascension Character Sheet",
|
10 |
+
layout="wide",
|
11 |
+
initial_sidebar_state="expanded"
|
12 |
+
)
|
13 |
+
|
14 |
+
# Create the title
|
15 |
+
st.title("Mage: The Ascension Character Sheet")
|
16 |
+
|
17 |
+
# Display the image
|
18 |
+
st.image(image)
|
19 |
+
|
20 |
+
# Create input fields for character information
|
21 |
+
with st.form("character_info"):
|
22 |
+
st.subheader("Character Information")
|
23 |
+
name = st.text_input("Name:")
|
24 |
+
player = st.text_input("Player:")
|
25 |
+
chronicle = st.text_input("Chronicle:")
|
26 |
+
nature = st.text_input("Nature:")
|
27 |
+
demeanor = st.text_input("Demeanor:")
|
28 |
+
essence = st.text_input("Essence:")
|
29 |
+
affiliation = st.text_input("Affiliation:")
|
30 |
+
sect = st.text_input("Sect:")
|
31 |
+
concept = st.text_input("Concept:")
|
32 |
+
|
33 |
+
# Create a submit button
|
34 |
+
submit = st.form_submit_button("Submit")
|
35 |
+
|
36 |
+
# Create input fields for attributes
|
37 |
+
with st.form("attributes"):
|
38 |
+
st.subheader("Attributes")
|
39 |
+
st.columns(3)
|
40 |
+
with st.column(1):
|
41 |
+
st.subheader("Physical")
|
42 |
+
strength = st.slider("Strength", 0, 5, 0, key="strength")
|
43 |
+
dexterity = st.slider("Dexterity", 0, 5, 0, key="dexterity")
|
44 |
+
stamina = st.slider("Stamina", 0, 5, 0, key="stamina")
|
45 |
+
with st.column(1):
|
46 |
+
st.subheader("Social")
|
47 |
+
charisma = st.slider("Charisma", 0, 5, 0, key="charisma")
|
48 |
+
manipulation = st.slider("Manipulation", 0, 5, 0, key="manipulation")
|
49 |
+
appearance = st.slider("Appearance", 0, 5, 0, key="appearance")
|
50 |
+
with st.column(1):
|
51 |
+
st.subheader("Mental")
|
52 |
+
perception = st.slider("Perception", 0, 5, 0, key="perception")
|
53 |
+
intelligence = st.slider("Intelligence", 0, 5, 0, key="intelligence")
|
54 |
+
wits = st.slider("Wits", 0, 5, 0, key="wits")
|
55 |
+
|
56 |
+
# Create a submit button
|
57 |
+
submit = st.form_submit_button("Submit")
|
58 |
+
|
59 |
+
# Create input fields for abilities
|
60 |
+
with st.form("abilities"):
|
61 |
+
st.subheader("Abilities")
|
62 |
+
st.columns(3)
|
63 |
+
with st.column(1):
|
64 |
+
st.subheader("Talents")
|
65 |
+
alertness = st.slider("Alertness", 0, 5, 0, key="alertness")
|
66 |
+
art = st.slider("Art", 0, 5, 0, key="art")
|
67 |
+
athletics = st.slider("Athletics", 0, 5, 0, key="athletics")
|
68 |
+
awareness = st.slider("Awareness", 0, 5, 0, key="awareness")
|
69 |
+
brawl = st.slider("Brawl", 0, 5, 0, key="brawl")
|
70 |
+
empathy = st.slider("Empathy", 0, 5, 0, key="empathy")
|
71 |
+
expression = st.slider("Expression", 0, 5, 0, key="expression")
|
72 |
+
intimidation = st.slider("Intimidation", 0, 5, 0, key="intimidation")
|
73 |
+
leadership = st.slider("Leadership", 0, 5, 0, key="leadership")
|
74 |
+
streetwise = st.slider("Streetwise", 0, 5, 0, key="streetwise")
|
75 |
+
subterfuge = st.slider("Subterfuge", 0, 5, 0, key="subterfuge")
|
76 |
+
with st.column(1):
|
77 |
+
st.subheader("Skills")
|
78 |
+
crafts = st.slider("Crafts", 0, 5, 0, key="crafts")
|
79 |
+
drive = st.slider("Drive", 0, 5, 0, key="drive")
|
80 |
+
etiquette = st.slider("Etiquette", 0, 5, 0, key="etiquette")
|
81 |
+
firearms = st.slider("Firearms", 0, 5, 0, key="firearms")
|
82 |
+
martial_arts = st.slider("Martial Arts", 0, 5, 0, key="martial_arts")
|
83 |
+
meditation = st.slider("Meditation", 0, 5, 0, key="meditation")
|
84 |
+
melee = st.slider("Melee", 0, 5, 0, key="melee")
|
85 |
+
research = st.slider("Research", 0, 5, 0, key="research")
|
86 |
+
stealth = st.slider("Stealth", 0, 5, 0, key="stealth")
|
87 |
+
survival = st.slider("Survival", 0, 5, 0, key="survival")
|
88 |
+
technology = st.slider("Technology", 0, 5, 0, key="technology")
|
89 |
+
with st.column(1):
|
90 |
+
st.subheader("Knowledges")
|
91 |
+
academics = st.slider("Academics", 0, 5, 0, key="academics")
|
92 |
+
computer = st.slider("Computer", 0, 5, 0, key="computer")
|
93 |
+
cosmology = st.slider("Cosmology", 0, 5, 0, key="cosmology")
|
94 |
+
enigmas = st.slider("Enigmas", 0, 5, 0, key="enigmas")
|
95 |
+
esoterica = st.slider("Esoterica", 0, 5, 0, key="esoterica")
|
96 |
+
investigation = st.slider("Investigation", 0, 5, 0, key="investigation")
|
97 |
+
law = st.slider("Law", 0, 5, 0, key="law")
|
98 |
+
medicine = st.slider("Medicine", 0, 5, 0, key="medicine")
|
99 |
+
occult = st.slider("Occult", 0, 5, 0, key="occult")
|
100 |
+
politics = st.slider("Politics", 0, 5, 0, key="politics")
|
101 |
+
science = st.slider("Science", 0, 5, 0, key="science")
|
102 |
+
|
103 |
+
# Create a submit button
|
104 |
+
submit = st.form_submit_button("Submit")
|
105 |
+
|
106 |
+
# Create input fields for spheres
|
107 |
+
with st.form("spheres"):
|
108 |
+
st.subheader("Spheres")
|
109 |
+
st.columns(2)
|
110 |
+
with st.column(1):
|
111 |
+
correspondence = st.slider("Correspondence", 0, 5, 0, key="correspondence")
|
112 |
+
entropy = st.slider("Entropy", 0, 5, 0, key="entropy")
|
113 |
+
forces = st.slider("Forces", 0, 5, 0, key="forces")
|
114 |
+
with st.column(1):
|
115 |
+
life = st.slider("Life", 0, 5, 0, key="life")
|
116 |
+
matter = st.slider("Matter", 0, 5, 0, key="matter")
|
117 |
+
mind = st.slider("Mind", 0, 5, 0, key="mind")
|
118 |
+
prime = st.slider("Prime", 0, 5, 0, key="prime")
|
119 |
+
spirit = st.slider("Spirit", 0, 5, 0, key="spirit")
|
120 |
+
time = st.slider("Time", 0, 5, 0, key="time")
|
121 |
+
|
122 |
+
# Create a submit button
|
123 |
+
submit = st.form_submit_button("Submit")
|
124 |
+
|
125 |
+
# Create input fields for advantages
|
126 |
+
with st.form("advantages"):
|
127 |
+
st.subheader("Advantages")
|
128 |
+
st.columns(2)
|
129 |
+
with st.column(1):
|
130 |
+
st.subheader("Arete")
|
131 |
+
arete = st.slider("Arete", 0, 5, 0, key="arete")
|
132 |
+
with st.column(1):
|
133 |
+
st.subheader("Health")
|
134 |
+
bruised = st.slider("Bruised", 0, 5, 0, key="bruised")
|
135 |
+
hurt = st.slider("Hurt", 0, 5, 0, key="hurt")
|
136 |
+
injured = st.slider("Injured", 0, 5, 0, key="injured")
|
137 |
+
wounded = st.slider("Wounded", 0, 5, 0, key="wounded")
|
138 |
+
mauled = st.slider("Mauled", 0, 5, 0, key="mauled")
|
139 |
+
crippled = st.slider("Crippled", 0, 5, 0, key="crippled")
|
140 |
+
incapacitated = st.slider("Incapacitated", 0, 5, 0, key="incapacitated")
|
141 |
+
|
142 |
+
# Create a submit button
|
143 |
+
submit = st.form_submit_button("Submit")
|
144 |
+
|
145 |
+
# Create input fields for willpower
|
146 |
+
with st.form("willpower"):
|
147 |
+
st.subheader("Willpower")
|
148 |
+
willpower = st.slider("Willpower", 0, 5, 0, key="willpower")
|
149 |
+
|
150 |
+
# Create a submit button
|
151 |
+
submit = st.form_submit_button("Submit")
|
152 |
+
|
153 |
+
# Create input fields for backgrounds
|
154 |
+
with st.form("backgrounds"):
|
155 |
+
st.subheader("Backgrounds")
|
156 |
+
backgrounds = st.text_area("Backgrounds", height=100)
|
157 |
+
|
158 |
+
# Create a submit button
|
159 |
+
submit = st.form_submit_button("Submit")
|
160 |
+
|
161 |
+
# Create input fields for other traits
|
162 |
+
with st.form("other_traits"):
|
163 |
+
st.subheader("Other Traits")
|
164 |
+
other_traits = st.text_area("Other Traits", height=100)
|
165 |
+
|
166 |
+
# Create a submit button
|
167 |
+
submit = st.form_submit_button("Submit")
|
168 |
+
|
169 |
+
# Create input fields for experience
|
170 |
+
with st.form("experience"):
|
171 |
+
st.subheader("Experience")
|
172 |
+
experience = st.text_area("Experience", height=100)
|
173 |
+
|
174 |
+
# Create a submit button
|
175 |
+
submit = st.form_submit_button("Submit")
|
176 |
+
|
177 |
+
# Create input fields for quintessence
|
178 |
+
with st.form("quintessence"):
|
179 |
+
st.subheader("Quintessence")
|
180 |
+
quintessence = st.slider("Quintessence", 0, 5, 0, key="quintessence")
|
181 |
+
|
182 |
+
# Create a submit button
|
183 |
+
submit = st.form_submit_button("Submit")
|
184 |
+
|
185 |
+
# Create input fields for paradox
|
186 |
+
with st.form("paradox"):
|
187 |
+
st.subheader("Paradox")
|
188 |
+
paradox = st.slider("Paradox", 0, 5, 0, key="paradox")
|
189 |
+
|
190 |
+
# Create a submit button
|
191 |
+
submit = st.form_submit_button("Submit")
|