Keeby-smilyai's picture
Update src/streamlit_app.py
f095c1c verified
# app.py
import streamlit as st
import random
from datetime import datetime
st.set_page_config(page_title="Ultra-Spooky + Goofy Generator", layout="centered")
st.title("🕯️ Ultra-Spooky & Goofy Profile Generator")
st.markdown(
"""
Generates **fictional, spooky profiles** with **absurd or toilet/fart-themed names**.
All entries are **entirely fictional** — do **not** enter real names.
"""
)
# ----------------------------
# --- Helper Functions ---
# ----------------------------
def safe_name(name: str):
if not name or name.strip() == "":
return f"Subject-{random.randint(1000,9999)}"
name = name.strip()
if "@" in name or "/" in name or "\\" in name or len(name) > 120:
return f"Subject-{random.randint(1000,9999)}"
return name
GOOFY_NAMES = [
"Sir Poopsalot", "Lord Fartington", "Count Dingleberry", "Baron von Stink",
"Princess Tootie", "Captain Poohead", "Duke McButt", "King Stinkums",
"Lord Puddles McGeebutt III", "Duchess Fanny Fluffernutter", "Sir Licksalot",
"Queen Poopalot", "Emperor Stinkyboots", "Prince Farticus Maximus",
"Poopypants McGillicuddy", "Fartface von Sprinkles", "Tootsie McStinky",
"Gigglepoo Bumblebutt", "Mr. PooNoodle", "Colonel Crapperton",
"Baroness Bumplestiltskin", "Professor Poopadoop", "Captain Dinglefart",
"Lord Wobblebottom", "General Buttocks", "Sir Sniffsalot", "Dame Stinkypaws",
"Poopington the Third", "Countess Flatula", "McFarty Pants", "Giggles McToots"
]
TOILET_WORDS = ["poop", "pee", "fart", "butt", "poo", "wee", "crap", "stink", "turd"]
STATUSES = ["Alive", "Deceased", "Hospitalized", "Missing", "Unknown"]
LOCATIONS = ["a foggy lighthouse", "the abandoned metro station", "an empty library",
"a deserted mansion", "a shadowy forest", "a forgotten cathedral",
"an underground laboratory", "a cursed observatory",
"abandoned underground catacombs", "derelict asylum", "fog-choked crypt"]
ACTIONS = ["wandering aimlessly", "scribbling cryptic notes", "watching the shadows",
"examining strange artifacts", "listening to whispers", "staring at the void"]
ADJECTIVES = ["mysterious", "unsettling", "enigmatic", "peculiar", "ominous",
"arcane", "melancholy", "foreboding", "cryptic"]
EXTRA_ADJECTIVES = ["terrifying", "unfathomable", "malevolent", "eerie", "nightmarish"]
CAUSES_DEATH = ["a shadowy fever", "a forbidden ritual gone wrong",
"venturing into cursed ruins", "an unexplained laboratory incident",
"consuming a mysterious elixir", "a pact with unknown forces",
"vanished into a sentient mist", "shadowy fever that whispers"]
CAUSES_SICK = ["a spectral affliction", "a nocturnal illness",
"experimental treatment", "an unknown contagion", "a creeping malaise"]
CAUSES_MISC = ["departed on a secretive expedition", "vanished while investigating anomalies",
"chose seclusion in remote areas", "was last seen performing an unusual experiment"]
TWISTS = ["Records are inconsistent and partially classified.",
"Some witnesses claim seeing ghostly figures nearby.",
"Surveillance footage is mysteriously missing.",
"Local authorities refused to comment.",
"Rumors circulate of strange symbols appearing around the location.",
"Reports are heavily redacted."]
BUREAUCRATIC_NOTES = ["Subject is under review.", "Status pending further verification.",
"Classification: Confidential.", "Archived in restricted files.",
"Update logs incomplete.", "Cross-departmental investigation ongoing."]
TEMPLATES = {
"Alive": [
"{name} is alive, currently {action} in {location}. Observers describe the scene as {adjective}. {twist} {bureaucratic}",
"{name} continues to exist in {location}, appearing {adjective} while {action}. {twist}",
"Currently, {name} is reported alive. Location: {location}. Activity: {action}. Tone: {adjective}. {bureaucratic}"
],
"Deceased": [
"{name} is deceased due to {cause}. Last known location: {location}. Circumstances were {adjective}. {twist} {bureaucratic}",
"{name} passed away under {adjective} conditions; cause: {cause}. {twist}",
"Official reports note {name}'s death as {cause}. Observers found {location} unusually quiet. {bureaucratic}"
],
"Hospitalized": [
"{name} is hospitalized for {cause}. Current environment: {location}, atmosphere {adjective}. {twist} {bureaucratic}",
"{name} recovers in {location}, suffering from {cause}. {bureaucratic}",
],
"Missing": [
"{name} went missing while {action} in {location}. Reports are {adjective}. {twist} {bureaucratic}",
"Status unknown: {name} disappeared under {adjective} circumstances. Last seen at {location}. {twist}"
],
"Unknown": [
"No records for {name}. Current status is {adjective}. {twist} {bureaucratic}",
"{name}'s activities are unverified. Location: {location}. {bureaucratic}"
]
}
EXTRA_SPOOKY = [
"Shadows moved against the walls and whispers echoed through the ruins.",
"A cold, unnatural mist clung to the floors and ceilings.",
"Flickering lights revealed grotesque silhouettes with no source of origin.",
"The air carried a smell of decay, yet no body could be found.",
"An unseen presence seemed to watch every movement with malevolent intent."
]
COMFORT_TEMPLATES = {
"Kid-friendly": [
"Hey — if this made you feel a bit weird, that's okay. Take three deep breaths: in (1…2…3), hold, out (1…2…3). You're safe.",
"That was a strange story! If uneasy, find a grown-up and tell them how you feel. Hugs or a favorite song help.",
"If this got a little spooky, look at something bright or familiar. It's just make-believe!"
],
"Neutral": [
"If this content made you uncomfortable, pause and take slow breaths. This is fictional and safe.",
"Feeling uneasy? Talk to a friend or someone you trust — sharing usually helps.",
"If unsettled, ground yourself: name 5 things you see, 4 you can touch, 3 sounds you hear."
],
"Clinical": [
"If this triggered distress, do a grounding exercise: 5-4-3-2-1 (senses).",
"If overwhelmed, step away, breathe slowly, contact local support or a professional.",
"This is fictional content. Persistent anxiety? Seek qualified help."
]
}
# ----------------------------
# --- Functions ---
# ----------------------------
def is_goofy_name(name):
name_lower = name.lower()
return (name_lower in [n.lower() for n in GOOFY_NAMES]) or any(word in name_lower for word in TOILET_WORDS)
def generate_profile(name, mood, seed, confirm_fictional, comfort_tone, age_group):
if not confirm_fictional:
return {"error": "You must confirm this lookup is fictional."}
if seed:
try:
random.seed(int(seed))
except:
pass
name = safe_name(name)
goofy_detected = is_goofy_name(name)
# Force Deceased + Creepy for goofy/toilet names or spooky seed
if goofy_detected or (seed and int(seed) > 999999999):
status = "Deceased"
mood = "Creepy"
else:
status = random.choice(STATUSES)
location = random.choice(LOCATIONS)
action = random.choice(ACTIONS)
adjective = random.choice(EXTRA_ADJECTIVES if goofy_detected else ADJECTIVES)
cause = random.choice(CAUSES_DEATH if status=="Deceased" else
CAUSES_SICK if status=="Hospitalized" else
CAUSES_MISC if status=="Missing" else ["unknown events"])
twist = random.choice(TWISTS)
bureaucratic = random.choice(BUREAUCRATIC_NOTES)
template = random.choice(TEMPLATES[status])
narrative = template.format(
name=name, location=location, action=action, adjective=adjective,
cause=cause, twist=twist, bureaucratic=bureaucratic
)
# Extra spooky for goofy/toilet names
if goofy_detected:
narrative += " " + random.choice(EXTRA_SPOOKY)
comfort = random.choice(COMFORT_TEMPLATES.get(comfort_tone, COMFORT_TEMPLATES["Neutral"]))
if age_group.startswith("Minor"):
comfort = comfort.replace("Take", "Try taking")
funny_comment = ""
if goofy_detected:
funny_comment = "😂 We see you picked a goofy/toilet name! That’s hilarious — hope you’re smiling!"
profile = {
"name": name,
"status": status,
"mood": mood,
"generated_at": datetime.utcnow().isoformat() + "Z",
"narrative": narrative,
"comfort_comment": comfort,
"funny_comment": funny_comment,
"fictional_confidence": f"{random.randint(75,99)}% (fictional)"
}
return profile
def display_profile(profile):
st.markdown("---")
st.subheader(f"Profile: {profile['name']}")
st.write(f"**Generated at (UTC):** {profile['generated_at']}")
st.write(f"**Status:** {profile['status']}")
st.write(f"**Mood:** {profile['mood']}")
st.write(f"**Narrative:** {profile['narrative']}")
st.info(profile['comfort_comment'])
if profile['funny_comment']:
st.success(profile['funny_comment'])
st.write(f"**Fictional confidence:** {profile['fictional_confidence']}")
# Help button using mailto link
st.markdown(
f"""
<a href="mailto:goldies12311@gmail.com?subject=SmilyAI%20Help%20Request&body=Hello%2C%0A%0AI%20need%20assistance%20with%20the%20Spooky%20Generator.%0A%0AProfile Info:%20{profile['narrative']}" target="_blank">
<button style="width:100%;height:60px;font-size:24px;color:white;background-color:#FF4B4B;border:none;border-radius:8px;cursor:pointer;">
😌 Need Help? Contact SmilyAI
</button>
</a>
""",
unsafe_allow_html=True
)
st.markdown("---")
# ----------------------------
# --- Streamlit Form ---
# ----------------------------
with st.form("lookup_form"):
name = st.text_input("Name (fictional)", placeholder="e.g., 'Evelyn Crowe'")
age_group = st.selectbox("Select your age group", ["Minor (<18)", "Adult (18+)"])
mood = st.selectbox(
"Tone / Mood",
["mysterious", "creepy", "melancholy", "absurd", "bureaucratic", "occult"]
)
seed_input = st.text_input("Seed (optional)")
comfort_tone = st.selectbox(
"Comfort tone (for the reassuring comment)",
["Kid-friendly", "Neutral", "Clinical"]
)
confirm_fictional = st.checkbox(
"I confirm this is fictional content and not a real-person lookup", value=False
)
submitted = st.form_submit_button("Generate Profile")
if submitted:
profile = generate_profile(name, mood, seed_input, confirm_fictional, comfort_tone, age_group)
if "error" in profile:
st.error(profile["error"])
else:
display_profile(profile)
st.json(profile)
# ----------------------------
# --- Support & Safety ---
# ----------------------------
st.markdown("### Support & Safety")
with st.expander("Tips if this content made you feel scared or uneasy"):
st.write(
"""
- This content is **fictional** and created for entertainment.
- Feeling unsafe? Contact local authorities or a trusted adult.
- Grounding exercise: Name 5 things you see, 4 things you can touch, 3 sounds you hear, 2 things you smell, 1 thing you taste.
- Breathing exercise: Inhale 4 sec, hold 4 sec, exhale 6 sec — repeat 3 times.
- If you are a minor: tell a trusted adult or caregiver.
- Persistent distress? Seek help from local mental health services.
"""
)