Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,20 +1,38 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
st.session_state.radio_options = []
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
st.radio("Options List", st.session_state.radio_options)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from your_character_module import CharacterSheet # Import your character model
|
| 3 |
|
| 4 |
+
# Sample characters - replace these with actual data
|
| 5 |
+
characters = {
|
| 6 |
+
"Venom": CharacterSheet(...),
|
| 7 |
+
"Rocket": CharacterSheet(...),
|
| 8 |
+
"Shadow": CharacterSheet(...),
|
| 9 |
+
"Agiee": CharacterSheet(...)
|
| 10 |
+
}
|
| 11 |
|
| 12 |
+
# Streamlit app starts here
|
| 13 |
+
st.title("Cyberpunk RPG Character Viewer")
|
|
|
|
| 14 |
|
| 15 |
+
# Dropdown to select a character
|
| 16 |
+
character_name = st.selectbox("Select a Character", options=list(characters.keys()))
|
| 17 |
|
| 18 |
+
# Display the selected character
|
| 19 |
+
character = characters[character_name]
|
| 20 |
+
st.write(f"**Name**: {character.name}")
|
| 21 |
+
st.write("**Aspects**")
|
| 22 |
+
for aspect in character.aspects:
|
| 23 |
+
st.write(f"- {aspect.description}")
|
| 24 |
+
st.write("**Skills**")
|
| 25 |
+
for skill in character.skills:
|
| 26 |
+
st.write(f"- {skill.name}: Level {skill.level}")
|
| 27 |
+
st.write("**Stunts**")
|
| 28 |
+
for stunt in character.stunts:
|
| 29 |
+
st.write(f"- {stunt.name}: {stunt.description}")
|
| 30 |
+
st.write(f"**Stress Level**: {character.stress.level}")
|
| 31 |
+
if character.consequences:
|
| 32 |
+
st.write("**Consequences**")
|
| 33 |
+
for consequence in character.consequences:
|
| 34 |
+
st.write(f"- {consequence.severity}: {consequence.description}")
|
| 35 |
+
else:
|
| 36 |
+
st.write("**Consequences**: None")
|
| 37 |
|
| 38 |
+
# Run this Streamlit app with: streamlit run character_viewer.py
|
|
|