<?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 Marie-Luise Schmidt (Luise) on Medium]]></title>
        <description><![CDATA[Stories by Marie-Luise Schmidt (Luise) on Medium]]></description>
        <link>https://medium.com/@ml_schmidt?source=rss-299718f993e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*H1d2LIH6AV5vfOsHeYlESg.jpeg</url>
            <title>Stories by Marie-Luise Schmidt (Luise) on Medium</title>
            <link>https://medium.com/@ml_schmidt?source=rss-299718f993e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:08:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ml_schmidt/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[Turn a Tiny Python Script into a Web App with Streamlit]]></title>
            <link>https://medium.com/@ml_schmidt/turn-a-tiny-python-script-into-a-web-app-with-streamlit-dbd2fa3abdd0?source=rss-299718f993e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbd2fa3abdd0</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Marie-Luise Schmidt (Luise)]]></dc:creator>
            <pubDate>Mon, 05 May 2025 15:00:49 GMT</pubDate>
            <atom:updated>2025-05-05T15:00:49.895Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwAvwFaKasKqUTI0kdLYAQ.jpeg" /><figcaption>Designed by Freepik</figcaption></figure><h4><strong>A fun and friendly project for learners, refreshers, and curious minds</strong></h4><p>Do you have a small Python script lying around — something fun, maybe even silly — and wonder:<br> <em>“What could I actually do with this?”</em></p><p>Or are you revisiting Python with fresh eyes, reviewing the basics, and wanting to build something small — but delightful?</p><p>That’s how this little project started for me.</p><h3><strong>How it began</strong></h3><p>In my data science bootcamp, we used Streamlit for complex use cases — mostly to build dashboards or deploy machine learning models.<br>Powerful, yes. But also fragile at times.</p><p>I recently hit a wall trying to deploy a larger NLP app. It worked locally, but broke in the cloud — all because of nltk.download() that didn’t behave. Classic.</p><p>So I stepped back. And during a quick coding refresher, I built a simple Magic 8 Ball script. Just a few lines using random.choice().</p><p>That’s when I thought:</p><blockquote><em>“What if I gave this tiny thing a face?<br>A little interface — for me and my inner child?”</em></blockquote><h3>From script to app</h3><p>The original script was tiny:</p><pre><br>import random<br><br>question = input(&quot;Ask your question: &quot;)<br>answers = [&quot;Yes&quot;, &quot;No&quot;, &quot;Maybe&quot;, &quot;Ask again later&quot;]<br>print(random.choice(answers))</pre><p>But once you wrap it in <a href="https://streamlit.io/">Streamlit</a>, it becomes an interactive interface you can run in the browser — and share with friends.</p><h3>Styling the experience</h3><p>Once the basic functionality was in place, I wanted the app to feel like more than just a console script with a button. I wanted it to have a touch of personality — something that hinted at the playful mystery of the original Magic 8 Ball.</p><p>So I started experimenting.</p><p>First, I switched to a dark theme. I created a .streamlit/config.toml file and chose deep black and grey tones, accented with golden highlights to give the app a slightly magical glow. Then I added a transparent PNG of a Magic 8 Ball at the top of the page – just large enough to catch the eye, without taking over the layout.</p><p>To bring everything together, I used a bit of custom HTML and CSS inside Streamlit to style the button and footer. The button became rounded with a soft glow, and at the bottom of the page, I added a subtle footer with my name and links to my GitHub and LinkedIn. It’s a small touch, but it gives the app a sense of ownership and completion — like signing a little creative project before putting it on the shelf.</p><p>All of these elements are simple, but together they turn a toy script into a tiny product.</p><p>You can see the result live here:<br> 👉 <a href="https://magic-8-ball-mls.streamlit.app/">Try the app</a><br> 💻 <a href="https://github.com/MLSchmidtverse/magic-8-ball">View the code on GitHub</a></p><h3>What you actually need to build this</h3><p>One of the things I love about this project is how little it takes to get it up and running. The entire app consists of just a few files: the Python script itself, a requirements.txt file for deployment, a configuration file for the dark theme, and an image of the Magic 8 Ball to add visual character.</p><p>The requirements.txt is refreshingly short – in my case, it only includes one line:</p><pre>streamlit</pre><p>That’s all you need to make it work on Streamlit Cloud. You might be tempted to list every Python module you use, but here’s a quick tip: standard library modules like random don’t belong in the requirements file. They’re built into Python and don’t need to be installed separately. In fact, trying to include them can lead to unnecessary errors.</p><p>This tiny distinction — what’s standard and what’s external — is something many beginners stumble over. But once you’ve seen it in practice, it becomes second nature.</p><p>A full directory for this app might look like this:</p><pre>magic-8-ball/<br>├── app.py<br>├── requirements.txt<br>├── .streamlit/<br>│   └── config.toml<br>└── magic8ball.png</pre><p>It’s small. It’s tidy. It’s enough.</p><p>And that, in itself, is part of the charm.</p><h3>What I learned (and what you might too)</h3><p>This project reminded me that not everything we build needs to be complex to be meaningful.</p><p>In fact, I rediscovered how intuitive Streamlit can be when you’re not wrestling with heavy models or compatibility issues. I realized how even the smallest projects can create real satisfaction — especially when they look and feel like something you’d send to your friends for a little chuckle in between a stressful work day.</p><p>Most of all, I was reminded that joy is a perfectly valid reason to build something — especially in tech.</p><h3>Your turn</h3><p>If you have a small Python script sitting in a notebook or buried in a folder somewhere, <strong><em>this is your sign</em></strong>.</p><p>Take it out.<br>Wrap it in an interface.<br>Give it a button, a bit of color, maybe even a name.<br>Deploy it, and show it to someone. Or just keep it for yourself.</p><p>You don’t need a dataset or a dashboard.<br>You don’t need a use case that “justifies” it.<br>You just need an idea — and a few lines of code.</p><p>Sometimes, that’s more than enough.</p><p><em>Made with 🧠, Python, and childhood nostalgia.</em><br> <em>— Marie-Luise Schmidt</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbd2fa3abdd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>