Download src/generator.py from ayush77uh/yt: direct link, hf CLI and curl.
- Browser
- Download file 25.8 kB
-
https://huggingface.co/spaces/ayush77uh/yt/resolve/main/src/generator.py
- Command line
-
hf download hf://spaces/ayush77uh/yt/src/generator.py
-
curl -L -o generator.py https://huggingface.co/spaces/ayush77uh/yt/resolve/main/src/generator.py
25.8 kB
| import random | |
| import time | |
| LOCAL_SCRIPT_TOPICS = [ | |
| ( | |
| "Dark Psychology: How People Control You Without Force", | |
| "dark psychology", | |
| "The scariest control is not when someone orders you directly. It is when they shape your choices and make you believe the decision was yours.", | |
| "They use guilt, silence, confusion, and approval like invisible strings.", | |
| "Awareness is the moment those strings start losing power." | |
| ), | |
| ( | |
| "The Psychology of Manipulation in Daily Life", | |
| "manipulation", | |
| "Manipulation rarely looks evil in real life. Most of the time, it looks caring, emotional, urgent, or innocent.", | |
| "Someone pressures you, then calls it love. Someone crosses a boundary, then calls you sensitive.", | |
| "The first defense is learning to separate emotion from intention." | |
| ), | |
| ( | |
| "How Gaslighting Makes You Doubt Yourself", | |
| "gaslighting", | |
| "Gaslighting does not break your mind in one day. It slowly makes you question your memory, your reaction, and your sense of reality.", | |
| "First they deny what happened. Then they attack your tone. Then they make you apologize for noticing.", | |
| "If someone benefits every time you doubt yourself, pay attention." | |
| ), | |
| ( | |
| "Why Silent Treatment Is Psychological Control", | |
| "silent treatment", | |
| "Silence can be peaceful, but silent treatment is different. It is silence used as punishment.", | |
| "The goal is not space. The goal is to make you anxious enough to chase, explain, and surrender.", | |
| "Healthy people communicate distance. Manipulative people weaponize it." | |
| ), | |
| ( | |
| "How Narcissists Use Praise and Punishment", | |
| "narcissistic behavior", | |
| "A narcissistic pattern often starts with intense attention. They make you feel chosen before they make you feel dependent.", | |
| "Then the praise becomes rare, criticism becomes normal, and you start working to earn the old version of them back.", | |
| "The trap is not hate. The trap is chasing the beginning." | |
| ), | |
| ( | |
| "The Dark Psychology of Guilt Tripping", | |
| "guilt tripping", | |
| "Guilt is useful when you did something wrong. But guilt tripping is when someone uses your conscience as a remote control.", | |
| "They do not ask clearly. They make you feel selfish for having a boundary.", | |
| "A boundary that only works when nobody is upset is not a boundary." | |
| ), | |
| ( | |
| "How People Use Fear of Loss Against You", | |
| "fear of loss", | |
| "The fear of losing someone can make intelligent people ignore obvious disrespect.", | |
| "Manipulative people sense this fear and use distance, jealousy, or uncertainty to keep you emotionally hooked.", | |
| "When fear becomes the reason you stay, the connection is no longer free." | |
| ), | |
| ( | |
| "The Psychology of Love Bombing", | |
| "love bombing", | |
| "Love bombing feels powerful because it gives you emotional intensity before trust has had time to build.", | |
| "Too much attention too early can feel romantic, but sometimes it is a fast track to dependency.", | |
| "Real connection grows. Manipulation rushes." | |
| ), | |
| ( | |
| "How Toxic People Test Your Boundaries", | |
| "toxic behavior", | |
| "Toxic people do not always break your boundary immediately. First, they test how much discomfort you are willing to tolerate.", | |
| "A joke that insults you. A small lie. A delayed apology. A repeated excuse.", | |
| "Every time you ignore the small test, the next test becomes bigger." | |
| ), | |
| ( | |
| "The Psychology of Emotional Blackmail", | |
| "emotional blackmail", | |
| "Emotional blackmail sounds like love, but it works like pressure.", | |
| "If you loved me, you would do this. After everything I did for you, you owe me. Fine, I will suffer alone.", | |
| "Love does not need threats to be heard." | |
| ), | |
| ( | |
| "Why Some People Always Play the Victim", | |
| "victim mentality", | |
| "Some people use victimhood not because they are helpless, but because it protects them from accountability.", | |
| "Every conversation becomes their pain, their struggle, their excuse, until your hurt has no space.", | |
| "Empathy is powerful, but empathy without boundaries becomes a trap." | |
| ), | |
| ( | |
| "How Triangulation Creates Jealousy and Control", | |
| "triangulation", | |
| "Triangulation is when someone brings a third person into the emotional game to make you insecure.", | |
| "They mention an ex, compare you, praise someone else, or create competition where there should be trust.", | |
| "If someone needs your insecurity to feel powerful, that is not connection." | |
| ), | |
| ( | |
| "The Psychology of Push-Pull Behavior", | |
| "push-pull behavior", | |
| "Push-pull behavior keeps people addicted because the reward is unpredictable.", | |
| "One day they are warm. Next day they are distant. Then they return just enough to restart your hope.", | |
| "Inconsistency can become more addictive than love." | |
| ), | |
| ( | |
| "How People Use Confusion to Control You", | |
| "confusion", | |
| "Confusion is one of the most underrated control tactics.", | |
| "When someone keeps changing the story, moving the goalpost, or mixing affection with disrespect, your brain stays busy trying to solve them.", | |
| "A healthy relationship gives clarity. A manipulative one keeps you decoding." | |
| ), | |
| ( | |
| "Why Over-Explaining Makes You Easier to Control", | |
| "over-explaining", | |
| "When you over-explain every boundary, you accidentally teach people that your no is open for debate.", | |
| "Manipulative people do not need a better explanation. They need more chances to weaken your decision.", | |
| "A clear no is stronger than a nervous paragraph." | |
| ), | |
| ( | |
| "The Dark Psychology of Intermittent Reward", | |
| "intermittent reward", | |
| "The most addictive people are not always kind. They are unpredictable.", | |
| "Small moments of affection after long confusion can make your brain chase relief and call it love.", | |
| "If peace only comes in tiny doses, ask what is creating the pain." | |
| ), | |
| ( | |
| "How Fake Nice People Manipulate Trust", | |
| "fake niceness", | |
| "Fake nice people do not look dangerous at first because they hide control behind politeness.", | |
| "They help you, then remind you. They compliment you, then make you dependent. They smile, but keep score.", | |
| "Real kindness does not use generosity as a contract." | |
| ), | |
| ( | |
| "The Psychology of Power in Relationships", | |
| "power dynamics", | |
| "Every relationship has a power dynamic, even when nobody talks about it.", | |
| "The person who needs less approval, tolerates less disrespect, and fears loss less often holds more power.", | |
| "The goal is not to control people. The goal is to stop being controlled by fear." | |
| ), | |
| ( | |
| "How Manipulators Make You Feel Responsible for Their Emotions", | |
| "emotional responsibility", | |
| "One of the oldest manipulation tricks is making you responsible for emotions you did not create.", | |
| "They get angry, and you fix it. They feel insecure, and you shrink yourself. They feel sad, and your boundary disappears.", | |
| "You can care about someone's feelings without becoming controlled by them." | |
| ), | |
| ( | |
| "Why Walking Away Breaks Manipulation", | |
| "walking away", | |
| "Manipulation survives when the other person believes you will keep explaining, chasing, and proving yourself forever.", | |
| "Walking away removes the audience from the performance.", | |
| "Sometimes the strongest response is not winning the argument. It is leaving the game." | |
| ), | |
| ( | |
| "Why Discipline Feels Hard at First", | |
| "discipline", | |
| "Most people think discipline fails because they are weak. But the real reason is simpler: the brain hates sudden identity changes.", | |
| "Every time you try to become serious overnight, your old routine starts fighting back.", | |
| "The goal is not to become intense for one day. The goal is to become predictable to yourself." | |
| ), | |
| ( | |
| "The Psychology of Phone Addiction", | |
| "phone addiction", | |
| "Your phone is not stealing your focus by accident. It is designed to give your brain fast rewards before real work can feel meaningful.", | |
| "You check one notification, then suddenly ten minutes disappear without a decision.", | |
| "If you cannot sit with boredom, you cannot build anything deep." | |
| ), | |
| ( | |
| "Why Confidence Changes How People Treat You", | |
| "confidence", | |
| "People do not only respond to what you say. They respond to the way you carry your own presence.", | |
| "A person who doubts every word teaches the room to doubt them too.", | |
| "Confidence is not noise. Confidence is permission you stop begging for." | |
| ), | |
| ( | |
| "How Overthinking Destroys Action", | |
| "overthinking", | |
| "Overthinking feels intelligent because it keeps producing explanations. But most of the time, it is just fear wearing the costume of analysis.", | |
| "You plan, compare, imagine, delay, and call it preparation.", | |
| "At some point, clarity does not come before action. Clarity comes from action." | |
| ), | |
| ( | |
| "Why Comfort Zones Become Invisible Prisons", | |
| "comfort zone", | |
| "Comfort never looks dangerous in the beginning. It looks safe, familiar, and reasonable.", | |
| "But slowly, the things you avoid start controlling the size of your life.", | |
| "A comfort zone is not a place. It is a limit your brain starts defending." | |
| ), | |
| ( | |
| "The Hidden Cost of Wasting Your 20s", | |
| "your 20s", | |
| "Your 20s do not punish you immediately. That is why they are dangerous.", | |
| "You can waste a day and still feel fine. You can waste a month and still look normal.", | |
| "But the bill comes later, when options become fewer and excuses become heavier." | |
| ), | |
| ( | |
| "Why People Lose Respect for You", | |
| "respect", | |
| "Respect rarely disappears in one dramatic moment. It leaks slowly through repeated patterns.", | |
| "When you say yes while wanting to say no, when you break your own standards, when you explain too much.", | |
| "People notice patterns long before they say anything." | |
| ), | |
| ( | |
| "How to Build Focus in a Distracted World", | |
| "focus", | |
| "Focus is not something you find. Focus is something you protect.", | |
| "The modern world does not need to defeat you. It only needs to interrupt you enough times.", | |
| "A focused person is dangerous because their energy moves in one direction." | |
| ), | |
| ( | |
| "Why Most People Stay Average", | |
| "average mindset", | |
| "Most people do not stay average because they lack talent. They stay average because average behavior feels socially safe.", | |
| "Nobody judges you for scrolling, delaying, complaining, or doing the minimum.", | |
| "Average is comfortable because it never asks you to explain your ambition." | |
| ), | |
| ( | |
| "The Psychology of Self-Control", | |
| "self-control", | |
| "Self-control is not about suppressing desire forever. It is about not obeying every impulse like it is an order.", | |
| "The gap between impulse and action is where your future is decided.", | |
| "If your mood can control your actions, your goals are not really in charge." | |
| ), | |
| ( | |
| "Why Small Habits Change Your Identity", | |
| "habits", | |
| "Habits look small because one action does not change your life instantly.", | |
| "But every repeated action is a vote for the type of person you believe you are.", | |
| "Your identity is not built by what you promise. It is built by what you repeat." | |
| ), | |
| ( | |
| "How to Stop Seeking Validation", | |
| "validation", | |
| "Validation becomes dangerous when other people's reactions start deciding your mood.", | |
| "You post, wait, check, compare, and slowly your self-worth becomes a public vote.", | |
| "The strongest people are not the ones everyone approves of. They are the ones who can survive being misunderstood." | |
| ), | |
| ( | |
| "Why Deep Work Feels Boring", | |
| "deep work", | |
| "Deep work feels boring at first because your brain is used to faster rewards.", | |
| "Real progress does not give you a dopamine hit every ten seconds.", | |
| "The boring phase is not a sign that the work is wrong. It is a sign that your attention is detoxing." | |
| ), | |
| ( | |
| "The Dark Side of Being Too Available", | |
| "availability", | |
| "When you are always available, people stop experiencing your presence as valuable.", | |
| "Instant replies, instant yes, instant explanations; slowly your boundaries disappear.", | |
| "Scarcity is not manipulation. Sometimes it is self-respect." | |
| ), | |
| ( | |
| "Why Your Environment Controls Your Discipline", | |
| "environment", | |
| "Willpower is overrated when your environment keeps pulling you in the opposite direction.", | |
| "If your phone is beside you, junk food is visible, and distractions are one click away, you are not weak. You are surrounded.", | |
| "Design beats motivation because design removes unnecessary battles." | |
| ), | |
| ( | |
| "How to Become Mentally Strong", | |
| "mental strength", | |
| "Mental strength is not loud. It is the ability to do what is right while your emotions are trying to negotiate.", | |
| "Anyone can look strong when life is easy.", | |
| "Real strength appears when comfort is available but you still choose standards." | |
| ), | |
| ( | |
| "Why Comparison Kills Progress", | |
| "comparison", | |
| "Comparison feels useful because it gives you a measurement. But most of the time, it only steals energy from execution.", | |
| "You compare your chapter one to someone else's chapter twenty and call yourself behind.", | |
| "The only comparison that matters is whether your current habits can create your desired future." | |
| ), | |
| ( | |
| "The Psychology of Procrastination", | |
| "procrastination", | |
| "Procrastination is not always laziness. Many times it is emotional avoidance.", | |
| "The task feels unclear, uncomfortable, or connected to failure, so your brain pushes it away.", | |
| "Make the first step so small that fear has no space to argue." | |
| ), | |
| ( | |
| "Why Silence Builds Power", | |
| "silence", | |
| "Not every thought needs to become a message. Not every plan needs to become an announcement.", | |
| "When you speak less, your actions start carrying more weight.", | |
| "Silence is powerful because it stops giving people access to every part of your mind." | |
| ), | |
| ( | |
| "How to Rebuild Your Life Quietly", | |
| "rebuilding life", | |
| "The best life changes usually do not look dramatic from the outside.", | |
| "You sleep earlier, scroll less, study longer, train quietly, and stop explaining yourself.", | |
| "One day people notice the result, but they never saw the private rebuild." | |
| ), | |
| ] | |
| def build_local_script(topic, core, hook, observation, closing): | |
| return f""" | |
| SCRIPT: | |
| {hook} | |
| And that is exactly why this matters. | |
| Most people look at {core} like it is a personality trait. | |
| Either you have it, or you do not. | |
| But that is a lazy explanation. | |
| The truth is, your behavior is being shaped every day by small decisions you barely notice. | |
| You wake up and check your phone before your mind has even become clear. | |
| You delay one important task and call it a small break. | |
| You say yes to things that drain you because saying no feels uncomfortable. | |
| Then at night, you wonder why your life feels stuck. | |
| Most people never notice this... | |
| Your future is not destroyed by one big mistake. | |
| It is usually weakened by tiny patterns that repeat for months. | |
| {observation} | |
| And this is where the game begins... | |
| If you want to change your results, you cannot only chase a better mood. | |
| You need a better system. | |
| A system means you stop asking your feelings for permission every time something important has to be done. | |
| If you need motivation to start, your brain will keep waiting for the perfect emotional weather. | |
| And perfect emotional weather almost never comes. | |
| So make the first step obvious. | |
| Make the distraction harder. | |
| Make the correct action easier. | |
| If you want to study, keep the book open before the session starts. | |
| If you want to focus, put the phone away before the urge appears. | |
| If you want respect, stop making promises you already know you will not keep. | |
| That is not extreme. | |
| That is basic self-leadership. | |
| People think transformation looks cinematic. | |
| But most real transformation looks boring from the outside. | |
| Repeating the same standard. | |
| Protecting the same hour. | |
| Choosing the same hard thing. | |
| Again and again. | |
| Until your brain stops treating it like a fight and starts treating it like your identity. | |
| {closing} | |
| So the question is not whether you understand this. | |
| The question is whether your next action will prove that you actually do. | |
| TITLE SUGGESTIONS: | |
| {topic} | |
| The Truth About {core.title()} | |
| This Changes How You See {core.title()} | |
| THUMBNAIL TEXT IDEAS: | |
| STOP IGNORING THIS | |
| YOUR BRAIN IS TRICKING YOU | |
| CHANGE THE PATTERN | |
| """.strip() | |
| LOCAL_SCRIPT_ANGLES = [ | |
| ( | |
| "The uncomfortable truth", | |
| "The uncomfortable truth is that most people do not lose because they are not capable. They lose because their daily pattern is stronger than their intention.", | |
| "Look at your last seven days. Not your goals. Not your plans. Your actual behavior.", | |
| "If your routine was repeated for one full year, where would it take you?" | |
| ), | |
| ( | |
| "The hidden pattern", | |
| "There is a hidden pattern behind this, and once you see it, you cannot unsee it.", | |
| "Your brain keeps choosing the easiest emotional exit, then gives you a logical explanation later.", | |
| "The real question is simple: are you making decisions, or are your impulses making them for you?" | |
| ), | |
| ( | |
| "The social reality", | |
| "The world does not only judge your words. It reads your patterns, your energy, your timing, and your self-control.", | |
| "People notice when you are easily distracted. They notice when you need approval. They notice when your standards are flexible.", | |
| "Before you demand better treatment, ask if your behavior is teaching people to take you seriously." | |
| ), | |
| ( | |
| "The student trap", | |
| "Students do not fail only because they study less. Many fail because they confuse activity with progress.", | |
| "Sitting at a desk, watching videos, highlighting lines, and making plans can feel productive while changing nothing.", | |
| "If you cannot test yourself without looking, you are not learning yet. You are only getting familiar." | |
| ), | |
| ( | |
| "The identity shift", | |
| "Real change starts when you stop treating improvement like a temporary project and start treating it like identity evidence.", | |
| "Every repeated action tells your brain, this is who I am now.", | |
| "You do not become different by saying something different. You become different by repeating something different." | |
| ), | |
| ] | |
| def build_angle_script(topic, core, hook, observation, closing, angle_name, angle_hook, angle_example, angle_question): | |
| return f""" | |
| SCRIPT: | |
| {hook} | |
| But that is only the surface. | |
| {angle_hook} | |
| Most people talk about {core} like it is simple. | |
| They say, just be disciplined. | |
| Just focus. | |
| Just stop overthinking. | |
| Just work harder. | |
| But if it was that simple, everyone would already be doing it. | |
| The real problem is not information. | |
| The real problem is the invisible pattern running your day. | |
| You know what to do, but when the moment comes, your brain negotiates. | |
| It says, start after ten minutes. | |
| Check the phone once. | |
| Watch one more video. | |
| Make a better plan first. | |
| And slowly, the day disappears. | |
| Most people never notice this... | |
| The mind does not always destroy your life loudly. | |
| Sometimes it destroys your standards politely. | |
| It gives you excuses that sound reasonable. | |
| It gives you comfort that feels harmless. | |
| It gives you delay that looks like preparation. | |
| {observation} | |
| {angle_example} | |
| And this is where the game begins... | |
| If you want to change this, stop waiting for a perfect emotional state. | |
| Your mood is not a leader. | |
| Your mood is weather. | |
| It changes. | |
| It lies. | |
| It gets tired. | |
| It wants comfort. | |
| So if your actions depend on your mood, your future becomes unstable. | |
| The only way out is to create rules that are simple enough to follow even on a bad day. | |
| Not a fantasy routine. | |
| Not a ten-hour productivity plan. | |
| Just a clear standard. | |
| One focused hour. | |
| One difficult task before entertainment. | |
| One promise you do not break. | |
| One distraction you remove before it controls you. | |
| That is how self-respect is built. | |
| Not through speeches. | |
| Through evidence. | |
| Every time you keep a promise to yourself, your brain gets proof. | |
| Every time you break one, your brain also gets proof. | |
| And over time, that proof becomes identity. | |
| {closing} | |
| {angle_question} | |
| TITLE SUGGESTIONS: | |
| {topic} | |
| {angle_name}: {core.title()} | |
| Why {core.title()} Controls Your Future | |
| THUMBNAIL TEXT IDEAS: | |
| THIS IS THE PATTERN | |
| STOP LYING TO YOURSELF | |
| YOUR HABITS EXPOSE YOU | |
| """.strip() | |
| class StoryGenerator: | |
| def __init__(self): | |
| self.stories = [ | |
| ("How to Build Discipline Without Motivation", """ | |
| SCRIPT: | |
| Motivation has one dangerous weakness. | |
| It arrives with your mood, and it disappears with your mood. | |
| So if your future depends on how you feel today, you are already playing from a weak position. | |
| Most people never notice this... discipline is not about choosing a harder life. | |
| Discipline is about training your brain so clearly that important work stops becoming a negotiation. | |
| A student starts studying only when the pressure becomes painful. | |
| The gym becomes serious only when the mirror starts feeling uncomfortable. | |
| A career becomes urgent only when comparison starts hurting. | |
| And this is where the game begins... | |
| You are not delaying action because you are lazy. | |
| You are delaying action because your brain treats discomfort like danger. | |
| The real discipline hack is simple: stop making important work an emotional decision. | |
| Turn it into a system. | |
| If you wake up every day and ask, should I do it or not, you are already losing energy. | |
| Strong people are not motivated every day. | |
| They simply stopped allowing their important work to remain optional. | |
| Starting small does not mean starting weak. | |
| Starting small means giving your brain proof that you can keep a promise to yourself. | |
| One page. | |
| Ten pushups. | |
| Five minutes of deep work. | |
| That is not small. | |
| That is the first evidence of a new identity. | |
| The question is not how much you can do when life feels easy. | |
| The question is whether you can still do the right thing when your mood is not supporting you. | |
| Because that is your real level. | |
| TITLE SUGGESTIONS: | |
| How to Build Discipline Without Motivation | |
| The Real Secret of Discipline | |
| Stop Waiting for Motivation | |
| THUMBNAIL TEXT IDEAS: | |
| MOTIVATION IS A TRAP | |
| DISCIPLINE HACK | |
| DO IT WITHOUT MOOD | |
| """), | |
| ("Why Most Students Waste Time Without Realizing It", """ | |
| SCRIPT: | |
| Most students do not waste time because of their phone. | |
| The phone is just the easiest escape. | |
| The real problem is that they do not know exactly what they are supposed to do in the next one hour. | |
| And when there is no clarity, the brain chooses comfort. | |
| That is not a coincidence. | |
| You open the book, look at one page, and suddenly your water bottle, notifications, desk cleaning, and random planning all start looking important. | |
| Because the brain creates productive-looking distractions to escape a difficult task. | |
| And the most dangerous waste of time is the kind that does not look like waste. | |
| Decorating notes. | |
| Making timetables. | |
| Watching motivational videos. | |
| Arranging highlighters. | |
| All of this is useless if you are not doing active recall or solving problems. | |
| The real test of studying is not how long you sat at the table. | |
| The real test is how much you can explain without looking after you leave the table. | |
| Most people never notice this... | |
| Their brain is not building learning. | |
| It is building familiarity. | |
| The page feels familiar, so they think they remember it. | |
| But in the exam, the mind goes blank. | |
| Why? | |
| Because recognition and recall are two different things. | |
| If you are serious, write one clear target before every study session. | |
| Not, today I will study the chapter. | |
| Write, today I will solve 20 questions. | |
| Today I will explain 3 concepts without looking. | |
| Today I will complete 2 past paper answers. | |
| Clarity reduces pressure. | |
| And when pressure goes down, focus becomes stable. | |
| The question is simple... | |
| Are you actually studying, or are you just creating the feeling of studying? | |
| TITLE SUGGESTIONS: | |
| Why Most Students Waste Time Without Realizing It | |
| Stop Fake Studying | |
| The Study Mistake Nobody Talks About | |
| THUMBNAIL TEXT IDEAS: | |
| FAKE STUDYING | |
| YOU ARE NOT LEARNING | |
| STOP WASTING TIME | |
| """) | |
| ] | |
| for topic, core, hook, observation, closing in LOCAL_SCRIPT_TOPICS: | |
| self.stories.append((topic, build_local_script(topic, core, hook, observation, closing))) | |
| for angle_name, angle_hook, angle_example, angle_question in LOCAL_SCRIPT_ANGLES: | |
| self.stories.append((f"{topic} - {angle_name}", build_angle_script(topic, core, hook, observation, closing, angle_name, angle_hook, angle_example, angle_question))) | |
| def generate_story(self): | |
| """Returns (script_text, topic)""" | |
| print("📜 Generating local fallback story...") | |
| time.sleep(1) # Simulate generation | |
| topic, script = random.choice(self.stories) | |
| return script.strip(), topic | |