Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import gradio as gr
|
3 |
+
import pandas as pd
|
4 |
+
|
5 |
+
# Streamlit UI setup
|
6 |
+
def main():
|
7 |
+
st.title("Pink Puppies Adventure ๐ธ๐ถ")
|
8 |
+
|
9 |
+
st.markdown("""
|
10 |
+
## Step-by-Step Rules and Concepts ๐
|
11 |
+
""")
|
12 |
+
|
13 |
+
# Getting Started Table
|
14 |
+
st.markdown("""
|
15 |
+
### 1. Getting Started ๐
|
16 |
+
""")
|
17 |
+
|
18 |
+
st.table(pd.DataFrame({
|
19 |
+
"Step": ["Open App", "Choose Puppy", "Begin Adventure"],
|
20 |
+
"Description": ["Launch the app from your device.", "Pick your favorite pink puppy.", "Start exploring the world of Pink Puppies."],
|
21 |
+
"Emoji": ["๐ฑ", "๐ถ", "๐"]
|
22 |
+
}))
|
23 |
+
|
24 |
+
# Interaction Table
|
25 |
+
st.markdown("""
|
26 |
+
### 2. Interaction ๐
|
27 |
+
""")
|
28 |
+
|
29 |
+
st.table(pd.DataFrame({
|
30 |
+
"Interaction Type": ["Buttons", "Sliders", "Dropdowns", "Data Tables"],
|
31 |
+
"Elements Used": ["Begin adventure, interact with items.", "Adjust puppy's energy levels.", "Select type of adventure.", "Display scores and achievements."],
|
32 |
+
"Emoji": ["๐พ", "๐๏ธ", "๐", "๐"]
|
33 |
+
}))
|
34 |
+
|
35 |
+
# Dramatic Situations
|
36 |
+
st.markdown("""
|
37 |
+
## Dramatic Situations ๐ญ
|
38 |
+
""")
|
39 |
+
|
40 |
+
st.markdown("""
|
41 |
+
### Situation 1: The Lost Puppy ๐พ๐
|
42 |
+
- Use the map to navigate.
|
43 |
+
- Collect clues from the surroundings.
|
44 |
+
- Find the hidden path to reunite with your puppy.
|
45 |
+
""")
|
46 |
+
|
47 |
+
st.markdown("""
|
48 |
+
### Situation 2: The Magic Potion ๐งโโ๏ธโจ
|
49 |
+
- Collect ingredients from various locations.
|
50 |
+
- Mix them in the potion lab.
|
51 |
+
- Use the potion to upgrade abilities.
|
52 |
+
""")
|
53 |
+
|
54 |
+
st.markdown("""
|
55 |
+
### Situation 3: The Great Puppy Race ๐๐ถ
|
56 |
+
- Train your puppy using the slider to manage energy.
|
57 |
+
- Choose the right path in the race.
|
58 |
+
- Use speed boosts available in dropdowns.
|
59 |
+
""")
|
60 |
+
|
61 |
+
st.markdown("""
|
62 |
+
## How to Play ๐ฎ
|
63 |
+
""")
|
64 |
+
|
65 |
+
st.markdown("""
|
66 |
+
### Actions
|
67 |
+
""")
|
68 |
+
|
69 |
+
st.table(pd.DataFrame({
|
70 |
+
"Action": ["Starting Adventure", "Finding Clues", "Creating Potion", "Participating in Race"],
|
71 |
+
"Instructions": ["Click the 'Begin Adventure' button.", "Tap on the map areas to collect clues.", "Select ingredients and mix using tools.", "Use sliders and dropdowns to control race."],
|
72 |
+
"Emoji": ["๐", "๐", "๐งช", "๐"]
|
73 |
+
}))
|
74 |
+
|
75 |
+
# User Interface Elements
|
76 |
+
if st.button('Begin Adventure ๐พ'):
|
77 |
+
st.write('Adventure Started! ๐')
|
78 |
+
|
79 |
+
st.slider('Puppy Energy Level ๐๏ธ', 0, 100, 50)
|
80 |
+
|
81 |
+
adventure_type = st.selectbox(
|
82 |
+
'Select Adventure Type ๐',
|
83 |
+
['Lost Puppy ๐พ๐', 'Magic Potion ๐งโโ๏ธโจ', 'Great Puppy Race ๐๐ถ']
|
84 |
+
)
|
85 |
+
|
86 |
+
data = pd.DataFrame({
|
87 |
+
'Scores': [95, 67, 84],
|
88 |
+
'Achievements': ['First Clue ๐', 'Potion Ingredient ๐งช', 'Race Completed ๐']
|
89 |
+
})
|
90 |
+
st.dataframe(data)
|
91 |
+
|
92 |
+
if __name__ == '__main__':
|
93 |
+
main()
|