<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shaswatsinha on Medium]]></title>
        <description><![CDATA[Stories by Shaswatsinha on Medium]]></description>
        <link>https://medium.com/@shaswatsinha0428?source=rss-9093f2bfe665------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ePCd5ACK8tNckKxI</url>
            <title>Stories by Shaswatsinha on Medium</title>
            <link>https://medium.com/@shaswatsinha0428?source=rss-9093f2bfe665------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:48:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shaswatsinha0428/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Missed a Power Bill Payment. So I Built an AI Agent That Makes Sure It Never Happens Again.]]></title>
            <link>https://medium.com/@shaswatsinha0428/i-missed-a-power-bill-payment-so-i-built-an-ai-agent-that-makes-sure-it-never-happens-again-ae94d9d257dd?source=rss-9093f2bfe665------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae94d9d257dd</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shaswatsinha]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 08:04:08 GMT</pubDate>
            <atom:updated>2026-03-20T08:04:08.238Z</atom:updated>
            <content:encoded><![CDATA[<p>A step-by-step story of how I built a personal Life Admin Agent using Claude AI and the Gmail API.</p><p>Last month, I got a disconnect notice from my electricity provider. Not because I didn’t have the money. I just… forgot. The email was sitting in my inbox, buried under a pile of newsletters and promotional junk. By the time I noticed, I was already past due with a $$ balance staring back at me.</p><p>The moment I opened that email and felt that sinking pit in my stomach, I made a decision: this is never happening again.</p><p>I’m a developer, and I knew AI could help. So I sat down and built something I now call the <strong>Life Admin Agent, </strong>a system that scans my Gmail, finds every bill, subscription, appointment, and expiring document, checks for anything unusual, and sends me a clean monthly report. Automatically.</p><p>Here’s exactly how I did it, explained so anyone can follow along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lnTYFV41Jlj7GKdDkW0QBw.png" /></figure><h3>The Problem: Small Tasks Pile Up Without You Realizing</h3><p>We all have those small but critical tasks that keep your life running. Paying bills. Renewing your driver’s license. Remembering that your car insurance is due on the 15th, not the 1st.</p><p>The problem is that all this information is scattered across dozens of emails from different senders, with different formats, arriving at different times. No single place shows you: <em>here’s everything you need to do this month, and here’s how much it’ll cost.</em></p><p>I wanted exactly that. One report. Once a month. Delivered to my inbox. No effort required.</p><h3>What the Agent Does</h3><p>The Life Admin Agent does five things:</p><p><strong>1. Finds your bills.</strong> It scans your Gmail for invoices, payment confirmations, and “amount due” emails. It pulls out the name, amount, due date, and whether you’ve already paid.</p><p><strong>2. Tracks your subscriptions.</strong> Netflix, Spotify, Claude Pro, gym memberships. It finds recurring charges and tells you what you’re paying monthly.</p><p><strong>3. Spots your appointments.</strong> Doctor visits, car service reminders, DMV appointments, anything with a date and a time.</p><p><strong>4. Flags expiring documents.</strong> Driver’s license renewal, car registration, passport expiry, things you need to act on before they lapse.</p><p><strong>5. Detects anomalies.</strong> This is the part I’m most proud of. The agent looks for things that seem off, a bill that’s unusually high, a duplicate charge, a subscription you forgot you were paying for. It flags these with a severity level (high, medium, low) and tells you what to do about it.</p><h3>What the Report Looks Like</h3><p>Here’s an actual report generated from my Gmail for March 2026:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FkwEJWnqq9P1AA7OrfSU_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G_yfyIcwuQFKt-P0PmizCg.png" /></figure><h3>How It Works: The Architecture</h3><p>The system has two parts: an interactive app for on-demand reports, and a Python script for full automation.</p><p><strong>The Interactive App (React)</strong></p><p>I built a React application that runs inside Claude’s chat interface. It connects to Gmail using Anthropic’s MCP (Model Context Protocol) integration, which lets Claude read your inbox directly. You click “Scan My Gmail,” wait about 30 seconds, and get a dashboard with expandable sections for each category.</p><p><strong>The Automated Script (Python)</strong></p><p>For hands-free monthly reports, there’s a Python script that:</p><ol><li><strong>Windows Task Scheduler</strong> triggers the script on the 1st of every month</li><li>The script connects to the <strong>Gmail API</strong> and scans your inbox</li><li>It sends the email data to the <strong>Claude API</strong> for analysis</li><li>Claude returns structured JSON with bills, subscriptions, anomalies, etc.</li><li>The script builds a styled <strong>HTML email</strong> and sends it to your inbox</li></ol><p>The whole thing runs on your local PC. No cloud hosting. No servers. No monthly fees beyond a negligible API cost (about $0.01–0.05 per report).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3n_wKBeOTkj2DIuc0B1Jg.png" /></figure><h3>The Code</h3><p>Let me walk through the key pieces. I’ll keep it simple.</p><h3>Scanning Gmail</h3><p>The script searches your inbox with multiple queries to cast a wide net:</p><pre>SEARCH_QUERIES = [<br>    &quot;bill OR invoice OR payment due OR amount due&quot;,<br>    &quot;subscription OR renewal OR membership OR recurring&quot;,<br>    &quot;appointment OR reminder OR scheduled OR booking&quot;,<br>    &quot;expiring OR expires OR renewal notice OR registration&quot;,<br>    &quot;receipt OR confirmation OR charge OR transaction&quot;,<br>]</pre><p>For each query, it grabs matching emails from the current month and extracts the sender, subject, date, and body text:</p><pre>def scan_gmail(service):<br>    start, end = get_month_range()<br>    all_msgs, seen = [], set()<br><br>    for q in SEARCH_QUERIES:<br>        results = service.users().messages().list(<br>            userId=&quot;me&quot;,<br>            q=f&quot;({q}) after:{start} before:{end}&quot;,<br>            maxResults=30<br>        ).execute()<br><br>        for m in results.get(&quot;messages&quot;, []):<br>            if m[&quot;id&quot;] not in seen:<br>                seen.add(m[&quot;id&quot;])<br>                detail = service.users().messages().get(<br>                    userId=&quot;me&quot;, id=m[&quot;id&quot;], format=&quot;full&quot;<br>                ).execute()<br>                all_msgs.append(extract_message_data(detail))<br><br>    return all_msgs</pre><p>Nothing fancy here. We’re just asking Gmail: “Show me everything that looks like a bill, subscription, appointment, or expiration notice from this month.”</p><h3>Analyzing with Claude</h3><p>This is where the magic happens. We send all the email data to Claude and ask it to categorize everything:</p><pre>def analyze(messages):<br>    client = anthropic.Anthropic()<br><br>    response = client.messages.create(<br>        model=&quot;claude-sonnet-4-20250514&quot;,<br>        max_tokens=4096,<br>        messages=[{<br>            &quot;role&quot;: &quot;user&quot;,<br>            &quot;content&quot;: f&quot;&quot;&quot;Analyze these emails and extract:<br>            - Bills (name, amount, due date, paid status)<br>            - Subscriptions (name, amount, frequency)<br>            - Appointments (title, date, time, location)<br>            - Expiring documents (name, expiry, urgency)<br>            - Anomalies (spikes, duplicates, forgotten subs)<br><br>            Return structured JSON.<br><br>            EMAILS:<br>            {email_summaries}&quot;&quot;&quot;<br>        }],<br>    )<br><br>    return json.loads(response.content[0].text)</pre><p>Claude reads through your emails like a really smart personal assistant would: understanding context, extracting amounts, recognizing that a “disconnect notice” is an anomaly worth flagging at HIGH severity.</p><h3>Sending the Report</h3><p>The Gmail API (unlike some limited integrations) can actually <em>send</em> emails, not just draft them:</p><pre>def send_report(service, html):<br>    profile = service.users().getProfile(userId=&quot;me&quot;).execute()<br>    email = profile[&quot;emailAddress&quot;]<br><br>    msg = MIMEMultipart(&quot;alternative&quot;)<br>    msg[&quot;to&quot;] = email<br>    msg[&quot;from&quot;] = email<br>    msg[&quot;subject&quot;] = f&quot;📋 Life Admin Report – {month} {year}&quot;<br>    msg.attach(MIMEText(html, &quot;html&quot;))<br><br>    raw = base64.urlsafe_b64encode(msg.as_bytes()).decode()<br>    service.users().messages().send(<br>        userId=&quot;me&quot;, body={&quot;raw&quot;: raw}<br>    ).execute()</pre><h3>What I Learned</h3><p><strong>Start with a real problem.</strong> I didn’t build this because AI agents are trendy. I built it because I got a disconnect notice and felt embarrassed. That frustration is what kept me going through the setup, the debugging, the API rate limits, and the OAuth consent screens.</p><p><strong>Keep it simple.</strong> The entire script is one Python file, under 300 lines. No database. No web server. No Docker containers. It runs on your laptop with a scheduled task. Sometimes the best architecture is the simplest one that works.</p><h3>Try It Yourself</h3><p>The full source code is available on my github repo: <a href="https://github.com/Shaswat10Sinha/Life_Admin_Agentic_AI">https://github.com/Shaswat10Sinha/Life_Admin_Agentic_AI</a></p><p>A single Python file, a .env template, and a README with setup instructions for Windows, Mac, and Linux. If you&#39;ve ever missed a bill, forgotten to renew something, or just wished someone would tell you &quot;here&#39;s what you owe this month,&quot; this is for you.</p><p>The best part? Once it’s running, you don’t have to think about it. Ever. That’s the whole point.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae94d9d257dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gemini 3 is here… and the vibe coding is insane]]></title>
            <link>https://medium.com/@shaswatsinha0428/gemini-3-is-here-and-the-vibe-coding-is-insane-85644d80cd70?source=rss-9093f2bfe665------2</link>
            <guid isPermaLink="false">https://medium.com/p/85644d80cd70</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Shaswatsinha]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 19:43:32 GMT</pubDate>
            <atom:updated>2025-11-20T19:43:32.707Z</atom:updated>
            <content:encoded><![CDATA[<p>I built a 3D video game from scratch in just a few hours of prompting !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*YYFIXhkvrHIRMvN30eRYwA.jpeg" /></figure><p>The landscape of software development is fundamentally changing. For decades, the gap between a compelling creative idea and its technical implementation has been vast, requiring specialized knowledge and countless hours of meticulous coding. However, my recent experience building a complete 3D racing game called <strong>NEON RASH</strong> with Gemini 3 demonstrated a paradigm shift: the emergence of “<strong>vibe coding</strong>.”</p><p>Vibe coding is the process of translating complex, aesthetic, and functional requirements into a single, detailed prompt, allowing the model to handle the intricate, low-level coding needed to bring that vision to life. The speed and precision with which Gemini 3 executed this task were simply unprecedented.</p><p><strong>🎨 The Prompt as a Technical Blueprint</strong></p><p>The core of this project was a highly detailed, single prompt that demanded an ambitious combination of graphics, physics, controls, and sound design all centered around the <strong>80s Synthwave/Outrun</strong> aesthetic.</p><p>The prompt wasn’t just a general request; it acted as a technical specification, requiring the model to instantiate a full-stack game in one HTML file using the Three.js library. Consider the level of detail we provided:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1w7S80sRkbaR6aowU3hSz0rsOqKvzp_zQ-cVi07TGGpw%2Fpreview%3Fembedded%3Dtrue&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1w7S80sRkbaR6aowU3hSz0rsOqKvzp_zQ-cVi07TGGpw%2Fedit%3Fgid%3D1663162128&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=google" width="700" height="530" frameborder="0" scrolling="no"><a href="https://medium.com/media/8f0c9cf78e5af855b451bd4ba0dd3265/href">https://medium.com/media/8f0c9cf78e5af855b451bd4ba0dd3265/href</a></iframe><p>This level of descriptive complexity, which often breaks less capable models, was instantly absorbed by Gemini 3. The platform recognized the creative intent the <em>vibe </em>and translated it into thousands of lines of cohesive, functional JavaScript and WebGL code.</p><p>🖼️<strong> Visualizing the iterative Vibe</strong></p><p>The true power of vibe coding is the ability to instantly see how incremental, descriptive prompts refine the final product. We didn’t need to rewrite code; we simply added more <em>vibe</em> to the instructions.</p><p><strong>Iteration 1:</strong></p><p>The initial prompt established the core environment and vehicle.</p><blockquote><strong>Prompt Excerpt:</strong> “Create a complete, single-file HTML5 3D racing game using Three.js called ‘NEON RASH’. The style should be 80s Synthwave/Outrun (neon grid, dark sky, retro sun). Vehicle: A procedural low-poly motorcycle with a visible rider silhouette. Environment: Endless scrolling grid road.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p9ehjl4qFStGcfGUkcbXOA.jpeg" /></figure><p>Iteration 2 :</p><p>Here, we added the obstacles, the specific look of the vehicle, and key scenery elements to solidify the 80s highway feel.</p><blockquote><strong>Prompt additions:</strong> “…Vehicle: A procedural low-poly motorcycle (<strong>neon chassis, fat rear tire</strong>)… Obstacles: On the road: <strong>Jagged rocks and tall Traffic Lights</strong> (player must dodge these). Scenery: <strong>Palm trees</strong> generating on the sides of the road.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOA2MzVZSo_UpCwUKSTP6A.jpeg" /></figure><p>🔊<strong> Procedural Audio and Post Processing</strong></p><p>The soul of the <strong>Synthwave/Outrun</strong> aesthetic lies in its post-processing effects and sound design. We asked Gemini 3 to implement sophisticated shaders that are the trademark of 80s retro-futurism.</p><ul><li><strong>Neon Glow (UnrealBloomPass):</strong> We required the UnrealBloomPass for a powerful glow, with the crucial constraint: &quot;tune the threshold and strength so the road is <strong>not blindingly bright</strong>—only the neon elements should glow.&quot;</li><li><strong>CRT Emulation (ShaderPass):</strong> To complete the retro look, we mandated a custom ShaderPass for <strong>CRT effects</strong>, including <strong>scanlines, vignette, curvature, and chromatic aberration</strong>.</li></ul><p>The result is a game that looks like it’s being played on a tube television from 1986, instantly recognizable to anyone who craves that era’s specific digital mood. The entire experience, from the <strong>“INSERT COIN” start screen</strong> that gates game start and audio, to the ‘V’, ‘C’, and ‘G’ system keys for cycling camera views, colors, and the CRT effect, was delivered in a single, coherent file.</p><p>Here is the final product in action:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FC8rDMQSpdtQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DC8rDMQSpdtQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FC8rDMQSpdtQ%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9d0d27173beb31d6ce1b0d11d304da3/href">https://medium.com/media/c9d0d27173beb31d6ce1b0d11d304da3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85644d80cd70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a CRM Application in Palantir Foundry: My End-to-End Project Journey]]></title>
            <link>https://medium.com/@shaswatsinha0428/building-a-crm-application-in-palantir-foundry-my-end-to-end-project-journey-47dd518ef4fa?source=rss-9093f2bfe665------2</link>
            <guid isPermaLink="false">https://medium.com/p/47dd518ef4fa</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[crm]]></category>
            <category><![CDATA[palantir]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[Shaswatsinha]]></dc:creator>
            <pubDate>Mon, 01 Sep 2025 22:47:47 GMT</pubDate>
            <atom:updated>2025-09-01T22:47:47.256Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>CRM (Customer Relationship Management) systems like Salesforce or HubSpot are powerful tools that allow sales and business teams to manage relationships with customers, contacts, and companies. For this project, I was challenged to <strong>design and build a simplified CRM application in Palantir Foundry</strong>, starting from two raw datasets: <strong>Companies</strong> and <strong>People</strong>.</p><p>The task wasn’t about achieving perfection but about showing how I could <strong>translate a business need into a data-driven application</strong> — cleaning raw data, modeling relationships, and creating meaningful dashboards.</p><h3>Architecture</h3><p>The solution followed a simple but robust ETL + visualization pipeline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UkNpv1OLrveTssANg74Pxw.png" /><figcaption>Architecture</figcaption></figure><ol><li><strong>Raw Datasets</strong> → Imported companies and people spreadsheets.</li><li><strong>Transformations</strong> → Cleaned data with SQL in Foundry’s Code Repository.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DFXhEyRYHBLF_xPijdEAEg.png" /><figcaption>Repository Workspace</figcaption></figure><ol><li><strong>Identifiers</strong> → Created unique IDs for companies and people.</li><li><strong>Join Layer</strong> → Attempted linking people to companies by name.</li><li><strong>Dashboard Layer</strong> → Built charts and KPIs in Foundry Workshop.</li><li><strong>Lineage Visualization</strong> → Displayed the entire data flow in Foundry’s pipeline viewer.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gbwC-ifq_ewnUXdR31PmSA.png" /><figcaption>Data Lineage</figcaption></figure><h3>📊 The Data</h3><ul><li><strong>Companies Dataset</strong>:<br> Contained company names, websites, addresses, industries, and revenue figures.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tcOJtVGYE7j6x27za8ZsNQ.png" /><figcaption>Companies Dataset</figcaption></figure><ul><li><strong>People Dataset</strong>:<br> Contained individual names, titles, emails, phone numbers, and the company they were associated with.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qg3RePwM6_dNjLH7GTdc3Q.png" /><figcaption>People Dataset</figcaption></figure><p>Together, these datasets represent the two fundamental objects of a CRM: <strong>companies</strong> and the <strong>people working at those companies</strong>.</p><h3>🎯 Goal</h3><p>The business requirement was:</p><blockquote>“Use the two datasets to build a CRM-style application that can help manage and visualize customer relationships.”</blockquote><p>This meant:</p><ul><li>Structuring the data properly for analysis.</li><li>Building transformations to clean, normalize, and standardize.</li><li>Designing dashboards with relevant insights (top companies, industry breakdowns, etc.).</li><li>Demonstrating the end-to-end pipeline from raw to visualization.</li></ul><h3>🧭 Journey &amp; Challenges</h3><p>Like any project, it wasn’t a straight line:</p><p>Initially, I tried to use <strong>Code Workbooks</strong> for transformations but quickly hit limitations.</p><ul><li>I switched to the <strong>Code Repository</strong>, which allowed me to run SQL transformations cleanly and manage commits.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRX1HdSyiFIBmDS9di0ImA.png" /><figcaption>Foundry Code Repository</figcaption></figure><ul><li>While attempting to join People and Companies, I discovered <strong>company names didn’t align</strong> between the two datasets. Instead of artificially forcing a fuzzy match, I decided to highlight this data quality issue but still continue with separate dashboards.</li><li>I learned to use <strong>RIDs (resource IDs)</strong> for datasets in Foundry to reference transformations.</li></ul><h3>Steps to Solution</h3><ol><li><strong>Data Import</strong><br> Uploaded both Shaswat_data_Companies and Shaswat_data_People.</li><li><strong>Transformations</strong></li></ol><ul><li>For Companies: casted revenue to numeric, standardized company names, added a company_id.</li><li>For People: cleaned names/titles, added person_id, preserved emails and phone numbers.</li></ul><p>3. <strong>Join Attempt</strong><br> Tried joining on company_name. Identified mismatches but showcased how the join logic would work.</p><p>4. <strong>Dashboards</strong><br> Built Workshop dashboards, including:</p><ul><li>Top 10 companies by revenue</li><li>Pie chart of industry revenue share</li><li>Bar chart of number of companies per industry</li></ul><p>5. <strong>Pipeline Visualization</strong><br>Showed the lineage from raw → transform → join → dashboard. Annotated this as my <strong>architecture diagram</strong>.</p><p>6. <strong>Optional Python Exploration</strong><br> Wrote a Python transform to group people by industry and compute counts — demonstrating the ability to extend the pipeline beyond SQL.</p><h3>📈 Results</h3><p>By the end of the project, I had:</p><ul><li><strong>Cleaned datasets</strong> for companies and people.</li><li>A <strong>joined CRM table</strong> (with noted nulls).</li><li>A <strong>Workshop dashboard</strong> with meaningful insights:</li><li>Revenue distribution by industry</li><li>Top companies by revenue</li><li>Company counts per industry</li><li>An <strong>ETL pipeline diagram</strong> to demonstrate lineage.</li><li>Documentation of the challenges and my decisions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DFItEAsJR87N9kzbM1vwdA.png" /><figcaption>Dashboard</figcaption></figure><h3>💡 Reflections</h3><ul><li>This project wasn’t just about cleaning data — it was about <strong>designing an application mindset in Foundry</strong>.</li><li>Handling incomplete or inconsistent data (like mismatched company names) is a reality in CRM systems — and being able to highlight such issues is as important as solving them.</li><li>Foundry proved powerful in managing the end-to-end flow: ingestion, transformation, version control, visualization, and lineage.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47dd518ef4fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Weather Data ETL with Apache Airflow and AWS]]></title>
            <link>https://medium.com/@shaswatsinha0428/automating-weather-data-etl-with-apache-airflow-and-aws-48e719fee771?source=rss-9093f2bfe665------2</link>
            <guid isPermaLink="false">https://medium.com/p/48e719fee771</guid>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Shaswatsinha]]></dc:creator>
            <pubDate>Sun, 11 May 2025 08:17:41 GMT</pubDate>
            <atom:updated>2025-05-11T08:17:41.927Z</atom:updated>
            <content:encoded><![CDATA[<p>In the ever-evolving world of data engineering, building scalable and automated pipelines is a critical skill. I recently completed a project that combines real-time weather data extraction with cloud-native tools to enable seamless ETL (Extract, Transform, Load) operations. In this article, I’ll walk you through how I built a robust weather data pipeline using Apache Airflow and various AWS services.</p><h3>🌦️ The Goal</h3><p>The objective was to create an automated end-to-end ETL pipeline that fetches weather data from a public API, transforms it, and makes it queryable for analysis — all with minimal manual intervention. The system is modular, scalable, and leverages the best of open-source and cloud-native tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kBEuuYDLaWQsywykVmo0Q.jpeg" /><figcaption>Architecture Diagram</figcaption></figure><h3>🌐 Architecture Overview</h3><p>This project is built using cloud and open-source components that interact as follows:</p><ul><li><strong>EC2 Instance</strong>: The Airflow instance runs on a t2.small EC2 instance with a Python virtual environment.</li><li><strong>Apache Airflow DAGs</strong>: Python-based Directed Acyclic Graphs (DAGs) orchestrate the ETL process.</li><li><strong>OpenWeatherMap API</strong>: Acts as the data source for real-time weather information.</li><li><strong>Data Transformation</strong>: Cleaning and reshaping is performed within the DAGs using Pandas.</li><li><strong>AWS S3</strong>: Transformed data is stored in CSV format for durability and scalability.</li><li><strong>AWS Glue</strong>: Crawlers extract schema and populate the Glue Data Catalog with metadata.</li><li><strong>AWS Athena</strong>: Uses metadata from Glue to create SQL-queryable tables.</li></ul><h3>🛠️ Workflow</h3><h3>1. Data Extraction</h3><p>Using a scheduled DAG in Apache Airflow, the pipeline fetches real-time weather data from the OpenWeatherMap API. The DAG is configured to run at specific intervals, pulling JSON responses for multiple geographic locations.</p><h3>2. Data Transformation</h3><p>The raw API response is cleaned and transformed within Python functions embedded in the Airflow DAG. This includes:</p><ul><li>Normalizing JSON into structured tabular format</li><li>Adding timestamp fields for traceability</li><li>Converting units (e.g., Kelvin to Celsius)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jAkQjBL_KcbvutC4S1mNuA.png" /><figcaption>DAG’s in Airflow</figcaption></figure><h3>3. Data Loading</h3><p>Transformed data is exported as .csv files and pushed to an Amazon S3 bucket. This ensures durability and scalability of data storage while keeping it readily accessible for downstream processes.</p><h3>4. Schema Cataloging with AWS Glue</h3><p>An AWS Glue Crawler is used to automatically detect the schema of the stored CSV files in S3. The metadata is then stored in the AWS Glue Data Catalog, making it accessible to other services like Athena.</p><h3>5. Data Querying with AWS Athena</h3><p>Once the schema is available, the data becomes queryable via AWS Athena using standard SQL. This enables easy ad hoc analytics, dashboarding, and integration with BI tools like QuickSight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sDUrWs5F2A6Y7PMrPp9i9w.png" /><figcaption>SQL Querying in Athena</figcaption></figure><h3>🚀 Setup Instructions</h3><h3>1. Launch and Configure EC2</h3><ul><li>Launch a <strong>t2.small EC2</strong> instance (Ubuntu preferred)</li><li>SSH into your instance and run:</li></ul><pre>sudo apt update<br>sudo apt install python3-pip<br>sudo apt install python3.10-venv<br>python3 -m venv airflow_venv<br>source airflow_venv/bin/activate<br><br># Install dependencies<br>pip install pandas s3fs apache-airflow<br><br># Initialize Airflow<br>airflow standalone</pre><ul><li>Note the <strong>Airflow web UI credentials</strong> and access it via the EC2’s public IPv4 DNS.</li></ul><h3>2. Create DAG in Airflow</h3><ul><li>Create a file named weather_dag.py and place it in the dags/ folder of your Airflow directory. The script should:</li><li>Make API requests</li><li>Normalize JSON</li><li>Save transformed data to an S3 bucket</li></ul><pre>with DAG(&#39;weather_dag&#39;,<br>        default_args=default_args,<br>        schedule_interval = &#39;@daily&#39;,<br>        catchup=False) as dag:<br><br><br>        weather_api_ready = HttpSensor(<br>        task_id =&#39;weather_api_ready&#39;,<br>        http_conn_id=&#39;weathermap_api&#39;,<br>        endpoint=&#39;/data/2.5/weather?q=Boston&amp;APPID=***your_api_key_goes_here***&#39;<br>        )<br><br><br>        extract_weather_data = SimpleHttpOperator(<br>        task_id = &#39;extract_weather_data&#39;,<br>        http_conn_id = &#39;weathermap_api&#39;,<br>        endpoint=&#39;/data/2.5/weather?q=Boston&amp;APPID=***your_api_key_goes_here***&#39;,<br>        method = &#39;GET&#39;,<br>        response_filter= lambda r: json.loads(r.text),<br>        log_response=True<br>        )<br><br>        transform_load_weather_data = PythonOperator(<br>        task_id= &#39;transform_load_weather_data&#39;,<br>        python_callable=transform_load_data<br>        )<br><br>        weather_api_ready &gt;&gt; extract_weather_data &gt;&gt; transform_load_weather_data</pre><p><em>(Optional: Add retry and logging logic for production readiness)</em></p><h3>3. AWS Glue Setup</h3><ul><li>Go to <strong>AWS Glue</strong> → Create a <strong>Glue Crawler</strong></li><li>Point it to your S3 bucket</li><li>Let it infer the schema</li><li>Save metadata in the <strong>Glue Data Catalog</strong></li></ul><h3>4. Query in AWS Athena</h3><ul><li>Go to <strong>AWS Athena</strong></li><li>Select the database created by Glue</li><li>Run SQL queries directly on the dataset</li></ul><h3>💡 Future Enhancements</h3><p>This project lays the foundation for more complex and intelligent data workflows. Some enhancements I’m planning include:</p><ul><li><strong>Improved error handling and retries</strong> within DAGs for robustness</li><li><strong>Automated crawler and table creation</strong> to minimize setup overhead</li><li><strong>EC2 instance scaling</strong> to handle more intensive data pulls or transformations</li><li><strong>Integration with visualization platforms</strong> for real-time weather dashboards</li></ul><h3>📎 GitHub Repository</h3><p>All code, including the DAG definitions, API scripts, and setup instructions, is available in the GitHub repo: <a href="https://github.com/Shaswat10Sinha/Airflow-ETL">https://github.com/Shaswat10Sinha/Airflow-ETL</a></p><h3>🚀 Final Thoughts</h3><p>This project not only strengthened my understanding of Airflow and AWS integrations but also highlighted how simple APIs can be leveraged for meaningful real-time analytics. Whether you’re working with IoT data, financial streams, or public datasets like weather, building automated pipelines helps unlock true data potential.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48e719fee771" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an AI Chatbot for Natural Language to SQL Querying with Streamlit]]></title>
            <link>https://medium.com/@shaswatsinha0428/building-an-ai-chatbot-for-natural-language-to-sql-querying-with-streamlit-44456da5eaf1?source=rss-9093f2bfe665------2</link>
            <guid isPermaLink="false">https://medium.com/p/44456da5eaf1</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Shaswatsinha]]></dc:creator>
            <pubDate>Sat, 01 Mar 2025 23:08:58 GMT</pubDate>
            <atom:updated>2025-03-02T01:05:02.493Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Have you ever wished you could query databases without writing SQL? What if you could just ask a question in plain English and get structured data in return? With advancements in AI, this is now possible. In this article, we’ll walk through building an AI-powered chatbot using <strong>Streamlit</strong> that allows users to upload CSV/XLSX files, treat them as tables, and query them using natural language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LD5XyIB18p61_LRTbjpLpg.jpeg" /></figure><h3>Project Overview</h3><p>This project leverages <strong>OpenAI’s GPT model</strong> to convert natural language questions into SQL queries. It uses <strong>Pandas and SQLite</strong> to process and execute queries on user-uploaded data. The frontend is built with <strong>Streamlit</strong>, making it interactive and user-friendly. This tool enables non-technical users to explore their datasets seamlessly.</p><h3>Features:</h3><p>✅ Upload multiple CSV/XLSX files and treat them as database tables<br>✅ Ask questions in <strong>plain English</strong> instead of writing SQL<br>✅ Execute queries and display results in a structured table<br>✅ Perform <strong>JOIN operations</strong> across multiple files seamlessly<br>✅ <strong>Future-ready</strong> for visualizing data with charts and graphs</p><h3>Tech Stack</h3><ul><li><strong>Python</strong> (Core logic)</li><li><strong>Streamlit</strong> (User interface)</li><li><strong>OpenAI API</strong> (SQL generation from natural language)</li><li><strong>Pandas &amp; SQLite</strong> (Data storage and processing)</li></ul><h3>Implementation Steps</h3><h3>1. Setting Up the Environment</h3><p>Before we start, install the required dependencies:</p><pre>pip install streamlit pandas openai sqlite3</pre><h3>2. Building the Streamlit UI</h3><p>The UI consists of an upload section for CSV/XLSX files and an input box for natural language queries.</p><pre>import streamlit as st<br>import pandas as pd<br>import sqlite3<br>import queries_handler<br><br>st.title(&quot;AI-Powered SQL Query Chatbot&quot;)<br><br># Upload multiple files<br>uploaded_files = st.file_uploader(&quot;Upload CSV or XLSX files&quot;, type=[&quot;csv&quot;, &quot;xlsx&quot;], accept_multiple_files=True)<br><br>if uploaded_files:<br>    table_dict = {}  # Dictionary to store table names and DataFrames<br>    conn = sqlite3.connect(&quot;:memory:&quot;)  # In-memory SQLite DB<br><br>    for file in uploaded_files:<br>        file_name = file.name.split(&quot;.&quot;)[0]  # Use filename as table name<br>        <br>        # Load file into DataFrame<br>        if file.name.endswith(&quot;.csv&quot;):<br>            df = pd.read_csv(file)<br>        else:<br>            df = pd.read_excel(file)<br><br>        df.to_sql(file_name, conn, index=False, if_exists=&quot;replace&quot;)  # Store in SQLite<br>        table_dict[file_name] = df  # Save DataFrame reference<br><br>    st.success(f&quot;Uploaded {len(uploaded_files)} files successfully!&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5AFWXfbl4llFB_Upp2tOrw.png" /></figure><h3>3. Generating SQL from Natural Language</h3><p>We use OpenAI’s GPT model to convert plain English into SQL:</p><pre>def nl_to_sql(nl_query, table_dict):<br>    # Extract table structures for better SQL generation<br>    table_info = &quot;\n&quot;.join([f&quot;{table}: {&#39;, &#39;.join(df.columns)}&quot; for table, df in table_dict.items()])<br><br>    prompt = f&quot;&quot;&quot;<br>    You are an AI that converts natural language questions into SQL queries. <br>    Available tables and their columns:<br>    {table_info}</pre><h3>4. Executing the SQL Query</h3><p>Once we get the SQL query from OpenAI, we execute it using Pandas:</p><pre> # Query input<br>    user_query = st.text_input(&quot;Ask a question in plain English:&quot;)<br><br>    if user_query:<br>        sql_query = queries_handler.nl_to_sql(user_query, table_dict)  # Convert NL to SQL<br>        <br>        if sql_query:<br>            st.write(f&quot;**Generated SQL Query:** `{sql_query}`&quot;)<br>            result_df = pd.read_sql_query(sql_query, conn)  # Execute SQL<br>            st.dataframe(result_df)  # Display result<br>        else:<br>            st.error(&quot;Failed to generate SQL. Try rewording your question.&quot;)</pre><h3>Query Execution Results</h3><p>Now, let’s test our project with some queries ranging from easy to complex: We are using two tables for this Employees and Departments.</p><h3>Basic Query:</h3><p><strong>“Show all employees working in the HR department.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8YXANK-sJ3e9GMm6MlH-g.png" /></figure><h3>Easy Query:</h3><p><strong>“Show me the total number of employees in each department.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1BXH2EXaOEwFHqzCqxXu6A.png" /></figure><h3>Medium Query:</h3><p><strong>“List the names of employees who earn more than the average salary in their department.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zuAWV45XoS7sLwOMymE-kw.png" /></figure><h3>Complex Query with CTE:</h3><p><strong>“Find the top 5 highest-paid employees in each department.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCxfbOWIpZ2eV4cbOGtQmA.png" /></figure><h3>Future Improvements</h3><p>🔹 <strong>Visualization Support</strong> — Adding chart generation to represent query results graphically.<br>🔹 <strong>Better Error Handling</strong> — Enhancing SQL validation to prevent execution failures.<br>🔹 <strong>Fine-Tuned AI Model</strong> — Customizing AI prompts for more accurate SQL conversion.<br>🔹 <strong>Authentication &amp; Access Control</strong> — Restricting database access to authorized users.<br>🔹 <strong>Persistent Storage</strong> — Storing user-uploaded files for future queries.</p><h3>Conclusion</h3><p>This project simplifies data querying by eliminating the need to write SQL. With a user-friendly UI and AI-driven SQL generation, it enables seamless interaction with structured data. Whether you’re a business analyst, data enthusiast, or someone looking for quick insights, this chatbot makes data querying effortless.</p><p>You can find the repo for this project on my github: <a href="https://github.com/Shaswat10Sinha/AI-Chatbot---Natural-Language-to-SQL-Querying-with-Streamlit">https://github.com/Shaswat10Sinha/AI-Chatbot---Natural-Language-to-SQL-Querying-with-Streamlit</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44456da5eaf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an AI-Powered Mood Based Music Player]]></title>
            <link>https://medium.com/@shaswatsinha0428/building-an-ai-powered-mood-based-music-player-d658066d78ba?source=rss-9093f2bfe665------2</link>
            <guid isPermaLink="false">https://medium.com/p/d658066d78ba</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[spotify]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Shaswatsinha]]></dc:creator>
            <pubDate>Sun, 29 Dec 2024 06:53:22 GMT</pubDate>
            <atom:updated>2024-12-29T06:58:54.354Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Imagine a world where your music playlist adapts to your mood in real-time! That’s exactly what my latest project does — combining <strong>AI, Computer Vision, and Music Streaming</strong> to deliver personalized music recommendations based on facial expressions. In this article, I’ll walk you through the design, implementation, and challenges of this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c9MmjxJQPh0aNPrh.png" /><figcaption>Person’s face displaying a range of emotions</figcaption></figure><h3>Project Overview</h3><p><strong>Title:</strong> Real-Time Mood Based Music Player</p><p><strong>What does it do?</strong><br>This application uses a webcam to detect emotions such as happiness, sadness, anger, and surprise. Based on the detected mood, it plays a matching playlist from Spotify, creating an interactive and dynamic user experience.</p><p><strong>Key Features:</strong></p><ul><li><strong>Real-time Emotion Detection</strong> using a custom CNN model.</li><li><strong>Spotify API Integration</strong> for dynamic playlist matching.</li><li><strong>Scalable Design</strong> that supports adding custom playlists.</li></ul><blockquote>The code to this project is also available on my GitHub account: <a href="https://github.com/Shaswat10Sinha/Mood-Based-Music-Player">https://github.com/Shaswat10Sinha/Mood-Based-Music-Player</a></blockquote><h3>Technical Breakdown</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPw2ZDA38FYTvIkWxt9bKw.png" /><figcaption>Flow Diagram</figcaption></figure><h3>1. Facial Expression Detection</h3><ul><li><strong>Dataset:</strong> FER 2013 dataset (Facial Emotion Recognition).</li><li><strong>Model:</strong> Custom-built Convolutional Neural Network (CNN) with:</li><li>4 Convolutional Layers</li><li>Activation functions (ReLU) for non-linearity</li><li>Pooling layers for dimensionality reduction</li><li>Dense layers with Dropout to prevent overfitting</li><li><strong>Training Framework:</strong> TensorFlow and Keras.</li><li><strong>Output:</strong> Classification into 7 emotions (angry, disgust, fear, happy, sad, surprise, neutral).</li></ul><pre>#construct CNN structure, CNN consists of many input and output layers these are called structures<br>model = Sequential()<br><br>#1st convolution layer<br>model.add(Conv2D(64, (5, 5), activation=&#39;relu&#39;, input_shape=(48,48,1))) # relu(rectified linear unit) is the activation function <br>model.add(MaxPooling2D(pool_size=(5,5), strides=(2, 2))) # strides the height and width  of the layer no. of units filter shifts each time!<br>#input_shape is 48x48 rgb pixels with 1 channels<br>#pool_size reducing its dimensionality and allowing for assumptions to be made about features contained<br><br><br><br>#2nd convolution layer<br>model.add(Conv2D(64, (3, 3), activation=&#39;relu&#39;))<br>model.add(Conv2D(64, (3, 3), activation=&#39;relu&#39;))<br>model.add(AveragePooling2D(pool_size=(3,3), strides=(2, 2)))<br><br>#3rd convolution layer<br>model.add(Conv2D(128, (3, 3), activation=&#39;relu&#39;))<br>model.add(Conv2D(128, (3, 3), activation=&#39;relu&#39;))<br>model.add(AveragePooling2D(pool_size=(3,3), strides=(2, 2)))<br><br>model.add(Flatten())<br><br>#fully connected neural networks   addiing the above layeyrs together<br>model.add(Dense(1024, activation=&#39;relu&#39;))<br>model.add(Dropout(0.2))<br>model.add(Dense(1024, activation=&#39;relu&#39;))<br>model.add(Dropout(0.2))<br>model.add(Dense(num_classes, activation=&#39;softmax&#39;))<br>#dense support the specification of their input shape<br><br><br>#batch process<br>gen = ImageDataGenerator()<br>train_generator = gen.flow(x_train, y_train, batch_size=batch_size)<br><br>#------------------------------<br>model.compile(loss=&#39;categorical_crossentropy&#39;<br>    , optimizer=keras.optimizers.Adam()<br>    , metrics=[&#39;accuracy&#39;]</pre><h3>2. Real-Time Video Processing</h3><p><strong>OpenCV:</strong> Captures video frames via webcam.</p><ul><li>Preprocessing: Converts frames to grayscale, resizes them, and normalizes pixel values.</li><li>Model Prediction: Identifies emotion in each frame.</li></ul><pre># Track the current emotion to avoid restarting playback<br>current_emotion = None<br><br>while True:<br>    ret, frame = cap.read()<br>    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)<br>    faces = face_cascade.detectMultiScale(gray, 1.3, 5)<br><br>    for (x, y, w, h) in faces:<br>        roi_gray = gray[y:y + h, x:x + w]<br>        roi_gray = cv2.resize(roi_gray, (48, 48))<br>        roi_gray = roi_gray / 255.0<br>        roi_gray = np.expand_dims(roi_gray, axis=0)<br>        roi_gray = np.expand_dims(roi_gray, axis=-1)<br><br>        predictions = model.predict(roi_gray)<br>        max_index = np.argmax(predictions[0])<br>        emotion = list(emotion_playlists.keys())[max_index]<br><br>        # Display emotion on frame<br>        cv2.putText(frame, emotion, (x, y - 10), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)<br>        cv2.rectangle(frame, (x, y), (x + w, y + h), (255, 0, 0), 2)</pre><h3>3. Music Recommendation</h3><p><strong>Spotify API Integration:</strong></p><ul><li>Establishes OAuth 2.0 authentication for secure access.</li><li>Fetches and plays playlists using mood-to-playlist mapping.</li><li>Handles token refresh for uninterrupted playback.</li></ul><pre># Define emotion categories and related playlists<br>emotion_playlists = {<br>    &#39;Angry&#39;: &#39;spotify:playlist: ---- Playlist link goes here------------&#39;,  # Rock Playlist<br>    &#39;Surprised&#39;: &#39;spotify:playlist:---- Playlist link goes here------------&#39;,  # Pop Playlist<br>    &#39;Neutral&#39;: &#39;spotify:playlist:---- Playlist link goes here------------&#39;,  # Classical Playlist<br>    &#39;Sad&#39;: &#39;spotify:playlist:---- Playlist link goes here------------&#39;,  # Blues Playlist<br>    &#39;Happy&#39;: &#39;spotify:playlist:---- Playlist link goes here------------&#39;  # Electronic Playlist<br>}<br><br># Initialize Spotify API<br>sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id=&quot;--------put your client id ---------&quot;,<br>                                                client_secret=&quot;--------put your secret key id ---------&quot;,<br>                                                redirect_uri=&quot;http://localhost:8888/callback&quot;,<br>                                                scope=&quot;user-read-playback-state,user-modify-playback-state&quot;))</pre><h3>Demo Walkthrough:</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ft4zTdf5vzKE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dt4zTdf5vzKE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ft4zTdf5vzKE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a480c9c8497500c75c8057a4acaac03/href">https://medium.com/media/4a480c9c8497500c75c8057a4acaac03/href</a></iframe><h3>Challenges Overcome</h3><ol><li><strong>Spotify Token Expiry:</strong> Implemented automatic token refresh for seamless playlist switching.</li><li><strong>Emotion Change Detection:</strong> Prevented playlist restarts by triggering updates only when mood changes.</li><li><strong>Model Optimization:</strong> Balanced accuracy and speed for real-time processing.</li></ol><h3>Use Cases</h3><ul><li><strong>Music Therapy:</strong> Enhance mental well-being with mood-matching playlists.</li><li><strong>Smart Home Integration:</strong> Connect to home speakers for ambient music control.</li><li><strong>Event Management:</strong> Set dynamic playlists for gatherings based on the crowd’s mood.</li><li><strong>Gaming Industry:</strong> Adapt background scores based on gamer emotions.</li></ul><h3>What’s Next?</h3><ul><li><strong>Advanced Emotion Detection:</strong> Support for more complex emotions like excitement and calmness.</li><li><strong>Custom Playlists:</strong> Allow users to link their own playlists.</li><li><strong>Multi-User Support:</strong> Handle different moods in group settings.</li><li><strong>UI/UX:</strong> Adding an user interface to make it accessible for public use as a standalone application.</li></ul><h3>Final Thoughts</h3><p>This project highlights the exciting potential of AI in enhancing user experiences through personalized content delivery. From music therapy to smart home integration, the possibilities are endless!</p><p>Have any thoughts or suggestions? Feel free to drop them in the comments below or connect with me on LinkedIn.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d658066d78ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>