-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
49 lines (39 loc) · 1.7 KB
/
app.py
File metadata and controls
49 lines (39 loc) · 1.7 KB
1
2
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
import streamlit as st
import time
import random
from PIL import Image
import os
# Page setup
st.set_page_config(page_title="Canopy Vibe Oracle", page_icon="🔮")
# 1. AVATAR DISPLAY
if os.path.exists('avatar.png'):
img = Image.open('avatar.png')
st.image(img, use_container_width=True)
st.title("🔮 Canopy Vibe Oracle")
st.write("Developer: **Kriptoforsage**")
st.divider()
# 2. INTERFACE
name = st.text_input("Enter your nickname:", placeholder="Kriptoforsage")
if st.button("Get Oracle Prediction"):
if name:
with st.status("Connecting to Canopy Protocol...", expanded=True) as status:
time.sleep(1)
status.update(label="Connection established!", state="complete", expanded=False)
# Predictions in English
predictions = [
"✨ The Canopy stars say: Your staking strategy will be highly successful today!",
"🎨 Vibe check: Your creativity is the key to unlocking Web3 rewards!",
"🐾 Your Siamese cat predicts: Great news is coming to your wallet soon!",
"🚀 Canopy energy is at its peak! Your contribution to the ecosystem is noticed."
]
selected = random.choice(predictions)
st.success(f"**Result for {name}:**")
st.header(selected)
# 3. CAT DISPLAY (Triggers if "cat" is in prediction)
if "cat" in selected.lower() and os.path.exists('cat.png'):
st.divider()
cat_img = Image.open('cat.png')
st.image(cat_img, caption="Your lucky Canopy charm", use_container_width=True)
st.balloons()
else:
st.error("Please enter a nickname!")