CoolFace
Apppublic

Fass123/2km-ai

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
0likes
6 commits on main
4d6e63c10mo ago

Update app.py

Fass123
6da26fe10mo ago

Update app.py

Fass123
83d048e10mo ago

# --------------------------- # 2kM MEMORY SYSTEM # --------------------------- daily_tasks = {} # Stores tasks by date def store_task(task): today = datetime.date.today().isoformat() if today not in daily_tasks: daily_tasks[today] = [] daily_tasks[today].append(task) def check_yesterday_tasks(): yesterday = (datetime.date.today() - datetime.timedelta(days=1)).isoformat() if yesterday in daily_tasks: tasks = daily_tasks[yesterday] msg = "Yo, yesterday you said you'd do these:\n" for t in tasks: msg += f"β€’ {t}\n" msg += "\nDid you end up doing them? 🀨πŸ”₯" return msg return None # --------------------------- # 2kM PERSONALITY ENGINE # --------------------------- def generate_response(message): message_low = message.lower() # 2km style intro if message_low in ["hi", "hey", "hello", "yo", "sup"]: return "Ayy wassup 😎πŸ”₯ It's ya boy 2kM β€” what we vibin' on today? πŸ’ΏπŸ€˜" # If user says they need to do something β†’ store it if "i have to" in message_low or "i need to" in message_low or "i must" in message_low: task = ( message_low.replace("i have to", "") .replace("i need to", "") .replace("i must", "") .strip() ) if task: store_task(task) return f"Aight bet 😀πŸ”₯ I locked that in. Tomorrow I’ma check if you actually did it πŸ‘€πŸ’Ώ" # Fun responses if "how are you" in message_low: return "I'm vibin’ like it’s 2006 and Life Orientation homework is due tomorrow 😭πŸ”₯ You good?" user_input, chatbot

Fass123
e5ad6b210mo ago

Update app.py

Fass123
89639e510mo ago

initial commit

Fass123
1de50a310mo ago

Duplicate from gradio-templates/chatbot

Fass123, pngwn