awacke1 commited on
Commit
efe06d5
Β·
verified Β·
1 Parent(s): cf07abe

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +67 -0
app.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import gradio as gr
3
+ import pandas as pd
4
+
5
+ def main():
6
+ # Title and Introduction
7
+ st.title("🐱 Cat Rider πŸ‡")
8
+ st.markdown("""
9
+ ## Welcome to Cat Rider!
10
+ In this immersive adventure, you will explore the thrilling world of feline riders. This game sets the stage for dramatic situations and guided storytelling with engaging interactive elements.
11
+ """)
12
+
13
+ # Rules Table
14
+ st.markdown("""
15
+ ### πŸ“œ Game Rules
16
+ | πŸ›€οΈ Step | πŸ“ Description |
17
+ |---------|----------------|
18
+ | 1️⃣ | Choose your Cat Rider |
19
+ | 2️⃣ | Select the Riding Gear |
20
+ | 3️⃣ | Set off on an Adventure |
21
+ | 4️⃣ | Encounter Challenges and Make Decisions |
22
+ | 5️⃣ | Complete the Quest |
23
+ """)
24
+
25
+ # Character Plot Elements: Dramatic Situations
26
+ st.markdown("### 🎭 Dramatic Situations")
27
+
28
+ st.markdown('''#### Situation 1: The Great Feline Escape πŸšͺ🐈
29
+ Your cat rider is trapped in an old mansion, which is about to be demolished. Using agility, wit, and bravery, orchestrate the perfect escape.
30
+ ''')
31
+
32
+ st.markdown('''#### Situation 2: The Treasure of the Lost Temple πŸ›οΈπŸ±
33
+ On a quest to retrieve an ancient artifact, your cat rider must navigate through a labyrinth filled with traps and guardian spirits.
34
+ ''')
35
+
36
+ st.markdown('''#### Situation 3: The Royal Tournament πŸ‘‘πŸ†
37
+ Compete in a grand tournament where the finest cat riders showcase their skills and bravery to earn the title of the Royal Rider.
38
+ ''')
39
+
40
+ # UI Elements
41
+ st.button('🐾 Choose your Cat Rider')
42
+ st.slider('Select your gear strength', 1, 10)
43
+ st.selectbox('Choose your path', ('Forest 🏞️', 'Desert 🌡', 'Mountains πŸ”οΈ'))
44
+
45
+ # Example of Data Table
46
+ data = {
47
+ 'Gear': ['Helmet', 'Armor', 'Boots', 'Gloves'],
48
+ 'Protection Level': [8, 7, 5, 4]
49
+ }
50
+
51
+ df = pd.DataFrame(data)
52
+ st.dataframe(df)
53
+
54
+ # Gradio Interactive Elements
55
+ def cat_rider_gear(gear_strength):
56
+ return f'{gear_strength} - The perfect balance of agility and protection!'
57
+
58
+ interface = gr.Interface(
59
+ fn=cat_rider_gear,
60
+ inputs=gr.inputs.Slider(minimum=1, maximum=10, default=5, label="Gear Strength"),
61
+ outputs="text"
62
+ )
63
+
64
+ interface.launch(share=True)
65
+
66
+ if __name__ == "__main__":
67
+ main()