<?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 Vidya on Medium]]></title>
        <description><![CDATA[Stories by Vidya on Medium]]></description>
        <link>https://medium.com/@vidyapb?source=rss-12fd89def4b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vfSgAtum5HSGuE3R</url>
            <title>Stories by Vidya on Medium</title>
            <link>https://medium.com/@vidyapb?source=rss-12fd89def4b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:57:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vidyapb/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[5 Best Notion Resources To Help You Earn Thousands of Dollars!]]></title>
            <link>https://vidyapb.medium.com/5-best-notion-resources-9812b675c896?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9812b675c896</guid>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[creator-economy]]></category>
            <category><![CDATA[notion-template]]></category>
            <category><![CDATA[notetaking]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Sun, 04 Sep 2022 10:13:37 GMT</pubDate>
            <atom:updated>2022-09-04T10:13:37.388Z</atom:updated>
            <content:encoded><![CDATA[<p>I earned more than $700 through my 2 Notion Templates: WritingOS (paid) and Newsletter Checklist (free).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*NF6_CcJVgkgp4VyAVcT-pw.png" /><figcaption>Screenshot from Vidya’s Revenue Tracker on Notion.</figcaption></figure><p>Currently, I spend 0 Marketing efforts to sell these templates. And I built these templates in less than 2 hours. :)</p><p>Unfortunately, in the beginning, I wasted a lot of time trying to learn Notion because I was looking for resources in the wrong places.</p><p>Save yourself 100s of hours of research by using these 5 resources to learn and monetize your Notion skills:</p><h4>1. Notion Guides and Tutorials</h4><p>Whether you’re a newbie or an advanced Notion user looking to build full-fledged Dashboards for your personal workspace or Startup, these tutorials will help you get there:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ypjM1MSTe2fiHfH33hn8w.png" /></figure><p>👉🏻 <a href="https://www.notion.so/help/guides">Notion Guides</a></p><h4>2. Notion Templates</h4><p>Want to set up your Freelance workspace on Notion? Or, start a daily Journal? Here are the templates from the Notion community, curated by the Notion team. Try the most effective workflows to organize your work and life. And discover new, creative ways to use Notion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_o8zxN2Fr58ac_e7mKwzw.png" /></figure><p>👉🏻 <a href="https://www.notion.so/templates">Notion Templates</a></p><h4>3. Blog and Templates by Red Gregory</h4><p>Red is definitely one of my favourites among Notion creators. She shares some amazing free Notion templates to start your Notion journey. If you’re an advanced Notion creator, try her Templates and watch videos where she talks about Notion formulas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PUXNlqP69JwJY8iwbSff_w.png" /></figure><p>👉🏻 <a href="https://www.redgregory.com/">Red Gregory</a></p><h4>4. Notion Templates and Video tutorials by Thomas Frank</h4><p>Another amazing Notion Creator. Love his YouTube content and the free templates he provides. One of my favourite templates: Minimalist Habit Tracker Template for Notion</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_ucGAzcQQMAlE-ydsDfsw.png" /></figure><p>👉🏻 <a href="https://www.youtube.com/c/ThomasFrankExplains">Thomas Frank</a></p><h4>5. Notion Mastery by Marie Poulin.</h4><p>If you’re someone who’s into Productivity, self-development, and/or own a business/startup, you’ll not regret investing in Notion Mastery. It also comes with an amazing community of Notion creators:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5vz_kBLtjB7DtCcu9aIOg.png" /></figure><p>👉🏻 <a href="https://vidya--mariepoulin.thrivecart.com/notion-mastery-solo/606cce1440f91/">Notion Mastery</a></p><p>Have you used any of these resources before? Or looking for better resources? Let me know in the comments. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9812b675c896" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How should creators make sure they don’t get taken advantage of?]]></title>
            <link>https://medium.com/swapstack-creator-content-hub/how-should-creators-make-sure-they-dont-get-taken-advantage-of-7656cab03d66?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7656cab03d66</guid>
            <category><![CDATA[sponsorship]]></category>
            <category><![CDATA[influencer-marketing]]></category>
            <category><![CDATA[newsletter-marketing]]></category>
            <category><![CDATA[email-marketing-tips]]></category>
            <category><![CDATA[email-marketing]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Thu, 09 Dec 2021 14:50:05 GMT</pubDate>
            <atom:updated>2021-12-09T18:56:51.762Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Should Creators Make Sure They Don’t Get Taken Advantage Of?</h3><p>5 Tips To Get Paid For What You’re Due as a Creator.</p><p>In this post we’ll talk about how creators can ensure that when working brands, they build a mutually beneficial relationship.</p><p>This article is transcribed from our video interview with <a href="https://www.youtube.com/c/CreatorWizard">Justin Moore</a> and <a href="https://www.linkedin.com/in/jakeschonberger/">Jake Schonberger</a>, which can be found <a href="https://www.youtube.com/watch?v=0L9nYwercfg"><strong>here</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WXLWXs5ZdYsGBXX4WiljzQ.jpeg" /></figure><p><strong>[Q] Anangsha:</strong> Whenever creators are working with a brand, what are some steps that the creators should take to make sure that they are not being taken advantage of by the brand?</p><p><strong>[A] Justin Moore:</strong> Creators are often get taken advantage of. I have 3 mindset shifts that I think are really critical for creators to protect themselves.</p><h3>1. “You deserve to be compensated and paid what you’re due”</h3><p>So mindset shift number one is that, you need to think &amp; know that you deserve to be compensated and paid what you’re due.</p><p>Whenever I ask creators who are struggling with this, if they would work a 9–5 job for free, they all answer, “Well, of course not”. So I say, <strong>“Why should creating content in partnership with the brand, be any different?”</strong> Remember, they’re getting tremendous value from working with you. Whether it’s reposting your content on their social media or potentially using it for paid advertising, you’re creating that value for them. But most importantly, they’re getting to access your audience that you’ve painstakingly built an intimate relationship with over the years, and they trust you!</p><p><strong>Don’t ever let a brand gaslight you</strong> and make you feel like you’re crazy for wanting to be paid for your work. If they do that, just move on, that’s not a partner that’s going to value you in the long run.</p><h3>2. “There is no one else like you!”</h3><p>Mindset shift number two is that, there is no one else like you! A lot of creators forget that. Remember that when a brand reaches out, there’s a reason that they’re doing that. <strong>Something about you resonated with them.</strong> Your personality, your connection with your audience, the quality of your content.</p><p>Yes, of course there are going to be brands that only care about your reach and what types of results you can drive for them. But, I think there are a lot more brands who are very selective about the types of creators that they partner with.</p><p>So, just keep that mindset going into the negotiation that they want to work with you.</p><h3>3. “Be willing to walk away”</h3><p>Mindset shift number three is that, you need to be willing to walk away from any brand partnership.</p><p>Just because they want to work with you, doesn’t mean that you have to. It’s just like a job interview. You should be asking questions and getting to know them to determine whether they would be a good fit for you and your audience.</p><p>Remember, <strong>it’s your platform and YOU are the one who ultimately gets to make the decision</strong> of whether you want to partner with them.</p><p>Once you embrace the fact that you are in control and that it won’t be the end of the world if you lose the deal, it’s going to give you a lot more confidence to price yourself more accurately.</p><p><strong>[A] Jake Schonberger:</strong> So, Justin has written and tweeted a lot about creators getting taken advantage. We see it as well. Sometimes brands negotiate really hard with newsletter writers to kind of get a cheap deal.</p><p>And in general, the best advice that we can give is that from our perspective, a newsletter writer can very easily understand the value that they create.</p><h3>4. Learn Newsletter Pricing</h3><p>So for example, on Swapstack, you can set your price for different Ad placements.</p><p>If you’re just starting out, we give you some guidance on our Blog on <a href="https://swapstack.co/newsletter-pricing-101/">how to actually start pricing</a> out your different ad placements and test those out.</p><p>As a newsletter starting to monetize you can test out what an appropriate <strong>Cost Per Thousand Open (CPO)</strong> is. We typically ask people or tell people to start around $30 to $50 CPO depending on your audience.</p><p>Speak to some brands, pitch that pricing and, if you’re not getting any good reactions, it might mean that your pricing is a little bit too high. If you are getting way too many people just saying, “Yep, we’re good to go”, it might mean that you can raise your pricing.</p><p>But once you’ve done a couple of iterations to understand what your pricing is, <strong>try not to falter from there</strong> because you know that that’s a sweet spot, and that you’re driving appropriate value for brands.</p><h3>5. Show Your Value</h3><p>A really powerful way to protect yourself from being taken advantage of, is to <strong>showcase your value through performance</strong>. So, make sure that you show the amount of clicks that you’re driving.</p><p>When you report to the brand, you can ask them if they drove conversions. And, <strong>use those conversion numbers</strong> in your follow-on pitches to other brands and show those brands that, “Hey, yes, maybe my newsletter is a little bit of expensive from your perspective, but we drive really good performance and it’s worth it.”</p><p>If a brand isn’t open to working with you on your numbers, maybe they’re not the right brand to work with. As Justin said, <strong>you should be willing to walk away</strong> if you’re not being treated well and recognized for the value you’re driving.</p><p><strong>Anangsha:</strong> That is so valuable. I mean, even I have felt the same way. Whenever I’m approaching a brand. These mindset shifts are extremely valuable — thank you for sharing!</p><p><a href="https://app.swapstack.co/"><strong>Join Swapstack today</strong></a> and start monetizing your newsletter! 💌</p><p>Watch the <a href="https://www.youtube.com/watch?v=0L9nYwercfg"><strong>full video here</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7656cab03d66" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swapstack-creator-content-hub/how-should-creators-make-sure-they-dont-get-taken-advantage-of-7656cab03d66">How should creators make sure they don’t get taken advantage of?</a> was originally published in <a href="https://medium.com/swapstack-creator-content-hub">Swapstack: Creator Content Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Tips for Creators to Increase Engagement With Their Audience.]]></title>
            <link>https://medium.com/swapstack-creator-content-hub/3-tips-for-creators-to-increase-engagement-with-their-audience-9c2baf506fdc?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c2baf506fdc</guid>
            <category><![CDATA[newsletter-marketing]]></category>
            <category><![CDATA[creators]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[newsletter]]></category>
            <category><![CDATA[email-marketing]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Mon, 06 Dec 2021 16:43:15 GMT</pubDate>
            <atom:updated>2021-12-06T16:43:46.761Z</atom:updated>
            <content:encoded><![CDATA[<h3>3 Tips for Creators to Increase Engagement With Their Audience</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1LmnLyqmpuupC7PKRjODZA.png" /><figcaption>Newsletter Advertising 101</figcaption></figure><p>This article is transcribed from our video interview with <a href="https://www.youtube.com/c/CreatorWizard">Justin Moore</a> and <a href="https://www.linkedin.com/in/jakeschonberger/">Jake Schonberger</a>, which can be found <a href="https://www.youtube.com/watch?v=0L9nYwercfg"><strong>here</strong></a>.</p><p><strong>[Q] Anangsha:</strong> So Justin, what are some tips for creators to increase engagement with their audience?</p><h3>1. Reply to Emails &amp; Comments</h3><p><strong>[A] Justin Moore:</strong> The best tip that I have to increase engagement with your audience is to reply to every single comment and email until it’s impossible. <strong>Engagement is built one to one rather than one to many</strong> in my experience.</p><p>So it’s really critical to slow down and figure out how you can have an impact in individual people’s lives. When you do that, I truly believe money will always follow somehow.</p><h3>2. Ask Users for Feedback</h3><p><strong>[A] Jake Schonberger:</strong> So I totally agree with Justin. I’m going to add a couple of thoughts from specifically the newsletter perspective.</p><p>You definitely have to react to every comment that is made. In your newsletter, you should also ask users for feedback. So either ask them, “Hey, do you like my writing?” Or, “Would you adjust any of what I’m doing?” Feedback IS a gift, recognize that even critical comments come from a place where your readers want you to create better content, so use that feedback &amp; test out a couple of suggestions (in your style, of course).</p><h3>3. Invite Users To Participate</h3><p><strong>[A] Jake Schonberger:</strong> You can also invite [your readers] to get involved and participate. So you can ask them, what should I write about next, or tell them what you’re going to write about next and ask them if they have any thoughts or quotes that you might want to include. And again, implement the feedback that you think is good.</p><p>If you don’t want to implement feedback that you were given, make sure you reply and tell them why, or just acknowledge that you might take it into account in the future.</p><p><strong>Make your readers feel part of the journey</strong> that you’re creating for them and they’ll love you for it. And they’ll keep interacting and engaging and more and more followers will do the same.</p><p>“People feel ownership over that which they help create.”</p><p><strong>Anangsha:</strong> That is very valuable to me. And I’m sure it would be valuable to all the other writers and creators who are watching this video right now.</p><p>Watch the <a href="https://www.youtube.com/watch?v=0L9nYwercfg"><strong>full video here</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c2baf506fdc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swapstack-creator-content-hub/3-tips-for-creators-to-increase-engagement-with-their-audience-9c2baf506fdc">3 Tips for Creators to Increase Engagement With Their Audience.</a> was originally published in <a href="https://medium.com/swapstack-creator-content-hub">Swapstack: Creator Content Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Newsletter Advertising 101: What Makes a Creator Easy to Work With]]></title>
            <link>https://medium.com/swapstack-creator-content-hub/newsletter-advertising-101-what-makes-a-creator-easy-to-work-with-8d71df609310?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d71df609310</guid>
            <category><![CDATA[email-marketing]]></category>
            <category><![CDATA[newsletter]]></category>
            <category><![CDATA[creators]]></category>
            <category><![CDATA[creator-economy]]></category>
            <category><![CDATA[newsletter-marketing]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Thu, 02 Dec 2021 16:33:45 GMT</pubDate>
            <atom:updated>2021-12-02T17:17:44.150Z</atom:updated>
            <content:encoded><![CDATA[<h4>The aspects that makes a creator “easy to work with” for sponsored collaborations with brands.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ollyl9zgA6NSm8v24m_Ckg.jpeg" /><figcaption>Newsletter Advertising 101</figcaption></figure><p>This article is transcribed from our video interview with <a href="https://www.youtube.com/c/CreatorWizard">Justin Moore</a> and <a href="https://www.linkedin.com/in/jakeschonberger/">Jake Schonberger</a>, which can be found <a href="https://www.youtube.com/watch?v=0L9nYwercfg"><strong>here</strong></a>.</p><p><strong>[Q]</strong> <strong>Anangsha:</strong> What makes a creator “easy to work with”? What aspects are covered under this?</p><p><strong>[A] Justin Moore:</strong> So there are three main ways as a creator for a brand to consider you easy to work with.</p><h3>1. Being responsive</h3><p>Surprisingly tons of people are just bad at E-mail and oftentimes the brand needs to hear back from you ASAP to get the ball rolling on this campaign.</p><p>So, when you take several days to get back to them, you’re basically telling them that if they were to hire you every single time they e-mail you, they’re going to have to wait three to four days to hear back. And, that’s simply not going to cut it, right?</p><p>Well, you might say, “Well, yeah, but if I were hired on the campaign, I would be more timely”. But, they don’t know that!</p><p>The timeliness of your first communication is all they have to go off of. So you need to treat that moment with the gravity it deserves.</p><h3>2. Be easy going with edits</h3><p>Inevitably there is going to need to be changes made to whatever content you create for the brand, right?</p><p>It’s not in the right tone or the key messages weren’t adequately incorporated. A lot of creators put up a big fuss about this, and that is super shortsighted. Your goal should not be a one-off collaboration with this brand. You want to turn this into something long-term and the best way to do this is by illustrating to the brand that you’re not just a line item or a transaction.</p><h3>3. Be a consultant and a strategist</h3><p>Most creators are very focused on themselves and their platforms. And they don’t typically take the time to truly get to know the brand and understand their mission and what they’re trying to accomplish.</p><p>Oftentimes when you do that you can uncover insights that the brand maybe has never considered or be able to propose a new strategy that totally changes the game for them. How can you bring differentiated value to the brand that no one else is bringing?</p><p><strong>[A]</strong> <strong>Jake Schonberger:</strong> So, I agree with everything Justin said, I have a couple things I would add. And, a lot of these kind of map back to the <a href="https://swapstack.co/newsletter-advertising-101-elements-of-a-clever-pitch-to-a-brand/">previous question</a>.</p><p>Being easy to work with from a Brand perspective really just means that you provide everything they need to get to a “Yes”. And the yes meaning, “Yes, let’s work together”.</p><p>So, that means:</p><ol><li>Making sure the brand knows what kind of ROI they’re going to see</li><li>Knows what the engagement is actually going to look like</li><li>What an Ad looks like</li><li>What the creator might need from the brand</li><li>How a creator typically works with a brand</li></ol><p>And then as a creator starts working with multiple brands, you’ll realize that most of the questions are pretty much the same.</p><p>So again, from my previous question, availability is what kind of character count, what kind of creative do they need? What does performance typically look like? You can kind of assume that most brands will ask and you can reduce friction upfront by providing all of that information to the Brand before they actually ask.</p><p>If you have all that information on hand, send it to the brand, they don’t have to send a follow up question or set up a meeting to talk about those things that you already know. And, it makes it very easy for a brand to decide, “Yes, let’s work together!” Or “No, this isn’t the right opportunity.”</p><p><strong>Anangsha:</strong> Yeah, that definitely makes a lot of sense. We need to show our previous proof, the ROI of previous brands, and reduce friction as much as possible as Jake very valuably added to it.</p><p>Watch the <a href="https://www.youtube.com/watch?v=0L9nYwercfg"><strong>full video here</strong></a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0L9nYwercfg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0L9nYwercfg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0L9nYwercfg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/14674ca26a8604c9c2fa45107398bd44/href">https://medium.com/media/14674ca26a8604c9c2fa45107398bd44/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d71df609310" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swapstack-creator-content-hub/newsletter-advertising-101-what-makes-a-creator-easy-to-work-with-8d71df609310">Newsletter Advertising 101: What Makes a Creator Easy to Work With</a> was originally published in <a href="https://medium.com/swapstack-creator-content-hub">Swapstack: Creator Content Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I made $1400 through my newsletter with less than 1-hour of work per day.]]></title>
            <link>https://vidyapb.medium.com/how-i-made-1400-through-my-newsletter-with-less-than-1-hour-of-work-per-day-b007ddd5e2b4?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b007ddd5e2b4</guid>
            <category><![CDATA[newsletter-marketing]]></category>
            <category><![CDATA[sponsorship]]></category>
            <category><![CDATA[freelance]]></category>
            <category><![CDATA[newsletter]]></category>
            <category><![CDATA[email-marketing]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Fri, 29 Oct 2021 11:18:47 GMT</pubDate>
            <atom:updated>2021-10-29T11:18:47.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqHSRCB5yZJPsXJkLhK5iA.jpeg" /></figure><p>Are you looking for a second source of income? Maybe you wanna start a side-hustle that doesn’t suck the life out of you?</p><p>About this time last year — around October 2020 — I decided to start a newsletter.</p><p>The reason was very selfish. It was not to give value to my subscribers. I simply want to have something where I can go to escape my 9 to 5. I read too many things and I go down weird rabbit holes. I know my boyfriend isn’t interested in browsing those links. So, I started a newsletter to find people who are willing to read what I share.</p><p>I did some research before I actually came up with a name for my newsletter: <a href="https://thecuriousbunch.xyz/"><strong>The Curious Bunch</strong></a>. Every single one of those suggestions included “FIND A NICHE”. Well, I couldn’t be more frustrated. I’m a generalist and it’s really hard for me to find a niche. I cannot stick with something for so long without experiencing it in the first place. Believe me, you don’t need a niche to start a newsletter right away. But, that’s a topic for another day.</p><p>So, yeah, that was my goal with the newsletter when I started. But eventually, I found more joy in curating links that are useful not only to myself but also to others. You know, giving back and all.</p><p>I never intended to monetize it. Heck, I didn’t even know people monetize their newsletters. 😱</p><p>Last week I was updating my personal Revenue page on Notion and noticed some interesting stats:</p><ul><li>I earned around <strong>$1400 dollars</strong> through my newsletter.</li><li>That’s <strong>~₹1,05,000 in Indian Rupees</strong>.</li><li>For <strong>less than 7 hours per week of effort</strong> on average.</li><li>That’s <strong>~1 hour per day</strong>.</li></ul><p>Most of the time, I don’t even feel like I spent 7 hours since it feels more like play than work. Isn’t this the dream!?</p><p><strong>What’s inside my newsletter?</strong> I curate the most interesting and useful links to help you with your productivity, creativity, and growth. Around 12–15 links on average. I write a brief summary of these links before asking the readers to click on them and read further.</p><p><strong>When did I start monetizing it?</strong> Since May 2021. After I reached 500 subscribers. It’s been 6 months as of today and ~24 newsletter issues.</p><p>So, how did I earn just by reading random articles and curating those links? That too without having 1000 subscribers? I’ll tell you how.</p><h3>1. Donations or Buy Me A Coffee links</h3><p>The easiest and most recommended way for free newsletters to earn money is through Donations or Buy Me A Coffee links.</p><p>When I first stumbled on this suggestion, I thought to myself, “Why would anyone pay me for a free newsletter?”</p><p>Or, you might feel you don’t have the right to ask or deserve the money for the minimum efforts you’re putting into your newsletter.</p><p>Well, the truth is, Donations or <a href="https://www.buymeacoffee.com/learnwithvidya"><strong>Buy Me A Coffee</strong></a> links are more like validation for the work you put out into this world. You’re allowing people to acknowledge your work. You’re letting the world celebrate your work through coffees. You’re doing yourself and others a favour when you put a Buy Me A Coffee link inside your newsletter issue.</p><p><strong>This is how I do it:</strong></p><ul><li>I place the link at the bottom of my newsletter.</li><li>Thank each and every one of my supporters before I ask others to donate.</li><li>Give them a shout-out by highlighting their work and any social profiles at the beginning of the newsletter.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*NO1fZTmcwnAWa7z6oVaD_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*f_CnRmOeYdH8dTAc_BrN_g.png" /></figure><p><strong>How did this help me?</strong> Thanks to <a href="https://techbizgurl.com/jesspicks/"><strong>Jessica Williams from #Jesspicks</strong></a> for this amazing idea about giving shout-outs to supporters. When I started giving shout-outs, I’ve seen an interesting effect on my other readers. For almost 2–3 months, I have sent an issue where at least one reader bought me a coffee the previous week.</p><p>Now, I have 47 AMAZING supporters <strong>and I’ve earned ~$280 through </strong><a href="https://www.buymeacoffee.com/learnwithvidya"><strong>Buy Me A Coffee</strong></a> as of October 2021. <strong>💰</strong></p><p>Also, my BMC link starts with only $1. So even my non-US supporters can support me without having to check their pockets twice. I highly recommend that you lower the barrier as much as possible so that others can support you and shower you with love by buying you a coffee. 🙂</p><h3>2. Selling Info-Products</h3><p>Are you knowledgeable in a specific niche? Do you believe people will benefit from sharing what you know? Start creating an info-product and selling it! You don’t have to put a price on it if you’re uncomfortable.</p><p>I made a free <a href="https://www.buymeacoffee.com/learnwithvidya/e/34880"><strong>Newsletter Checklist</strong></a> for all newsletter beginners. It is a simple 1-page Notion product that makes it easy to set up your newsletter.</p><p>I <strong>earned ~$35</strong> through these free info products. 💰</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yejlMq1b1VpgIzaGbMZnuw.png" /></figure><p><strong>Here are some ideas to create your next info-product:</strong></p><ul><li>A curated directory of tools for your audience. Ex: Tools for creators, Tools for designers, Maintain a job board for Product Managers, etc.</li><li>An e-book where you teach someone about how to monetize their work in your niche.</li><li>A list of successful Tweet templates.</li><li>A list of successful LinkedIn post templates.</li></ul><p>Let your imagination run wild!</p><h3>3. Affiliate Links</h3><p>Do you enjoy trying new tools and writing reviews about them? Are you always recommending new books to your friends and audience?</p><p>Then, you already know how to start affiliate marketing.</p><p>Find products or books you enjoy and those that align with your audience. Find an affiliate link for that product and paste it in your newsletter issue. Or, go to the creator of the product and politely ask them if you can do affiliate marketing for them. This only works if you actually bought the product for yourself and are using it regularly.</p><p>I used to recommend a few affiliate products and books in my newsletter but stopped because it takes a lot of work and great copywriting skills to sell them.</p><p>I <strong>earned ~$13</strong> through my affiliate sales. 💰</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GbGVlYbBkhrehxixRkk1aQ.png" /></figure><p>Sign-up for <a href="https://affiliate-program.amazon.in/home"><strong>Amazon Affiliates Program</strong></a> if you want to experiment with affiliate marketing.</p><h3>4. Newsletter Sponsorships</h3><p>Sponsorships are by far the most reliable form of income for my newsletter. Before hitting the 500 subscribers milestone, I did a ton of research on how people monetize their newsletter. The #1 way is to paywall your content and enable memberships through Substack. But, mine is a free newsletter and I didn’t wanna paywall any content.</p><p>So, I doubled down on the #2 way of monetizing a newsletter. Looking for sponsors.</p><p>That’s how I found <a href="https://swapstack.co/"><strong>Swapstack</strong></a> — a premier newsletter advertising marketplace. You do not need an insane number of subscribers to find relevant sponsors for your newsletter. There are many brands looking to sponsor newsletters that have as few as 500 subscribers, but with a highly engaged audience.</p><p>My first sponsor came from <a href="https://swapstack.co/"><strong>Swapstack</strong></a> and they booked 7 sponsorship slots after seeing the results in the first 3 slots. 🔥</p><p>I <strong>earned ~$1100</strong> through sponsorships and classifieds. 💰</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*BhTIpPD5z7j-aibMhxpE3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*bwbxvKs5kAFW8wbuN6QUvQ.png" /></figure><p><strong>Few suggestions about Sponsorships:</strong></p><ul><li>Cold-emailing sponsors is a skill. Learn it and practice it.</li><li>Find relevant sponsors for your audience. There’s nothing as cringe as finding a food-related advertisement in a marketing newsletter.</li><li>Start with a lower sponsorship price. I started mine with $30 and now increased it to $35.</li><li>If possible, add a personal note in your newsletter before introducing the sponsor to your readers.</li></ul><p><strong>Want more suggestions about how to land sponsorships? Comment under this post and let me know!</strong></p><h3>5. Other indirect ways</h3><p>Everything sounds dandy so far. But, should the source of income be within the walls of your newsletter? Absolutely not.</p><p>Through my newsletter, I found many gigs.</p><p>I found clients I otherwise wouldn’t have found. It provided me with unique social proof for my work. I started writing a newsletter for an amazing startup, wrote blogs for other clients, and eventually found an internship with <a href="https://swapstack.co/"><strong>Swapstack</strong></a> where I now help newsletter creators monetize their work.</p><p>One newsletter, many income streams. ❤</p><p>You can browse my <a href="https://vidya.so/freelance-work"><strong>freelance work</strong></a> to understand more about the kind of work I do for my clients.</p><h3>Takeaways</h3><p>The most important takeaway from this issue is that a newsletter opens you up to multiple income streams and helps you find clients you otherwise wouldn’t have found. It’s an amazing side-hustle that doesn’t suck the life out of you if you do it right. It provides you with strong social proof for your future gigs.</p><p><strong>Other points to keep in mind:</strong></p><ul><li>You can monetize your free newsletter without sponsorships or memberships.</li><li>Join a platform like <a href="https://swapstack.co/"><strong>Swapstack</strong></a> to find sponsors for your free newsletter.</li><li>Be consistent and play the long game if you wanna see results “fast”.</li></ul><p>Do you wanna know more about how to curate a newsletter or how to find sponsorships? Comment below and let me know!</p><p>Find more such articles on my blog: <a href="https://vidya.so/"><strong>vidya.so</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b007ddd5e2b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image Classifier — Zalando Clothing Store using Monk Library]]></title>
            <link>https://pub.towardsai.net/image-classifier-zalando-clothing-store-using-monk-library-18ce2d8a6418?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/18ce2d8a6418</guid>
            <category><![CDATA[image-classification]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Mon, 03 Aug 2020 17:12:01 GMT</pubDate>
            <atom:updated>2020-08-04T00:05:02.084Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://towardsai.net/p/category/computer-vision">Computer Vision</a></h4><h3>Image Classifier — Zalando Clothing Store using Monk Library</h3><p>This tutorial is about image classification on the Zalando Clothing Store dataset using Monk Library. In this dataset, there are high-res, color, and diverse images of clothing and models.</p><p>Tutorial available on <a href="https://github.com/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/4_image_classification_zoo/Classifier%20-%20Zalando%20Clothing%20Store.ipynb"><strong>GitHub</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*It5ANODAKzEfZEhjT0znlw.png" /></figure><h4>About Monk</h4><ul><li>With Monk, you can write less code and create an end to end applications.</li><li>Learn only one syntax and create applications using any deep learning library — PyTorch, Mxnet, Keras, TensorFlow, etc.</li><li>Manage your entire project easily with multiple experiments.</li></ul><p>This is the best tool to use for competitions held in platforms like Kaggle, Codalab, HackerEarth, AiCrowd, etc.</p><h3>Table of contents</h3><ol><li>Install Monk</li><li>Demo of Zalando Clothing Store Classifier</li><li>Download Dataset</li><li>Background work</li><li>Training from scratch: vgg16</li><li>Summary of Hyperparameter Tuning Experiment</li><li>Expert Mode</li><li>Validation</li><li>Inference</li><li>Training from scratch: mobilenet_v2</li><li>Comparing vgg16 and mobilenet_v2</li><li>Conclusion</li></ol><h3>Install Monk</h3><h4>Step 1:</h4><pre><em># Use this command if you&#39;re working on colab.</em><br>!pip install -U monk-colab</pre><p>For other ways to install, visit <a href="https://github.com/Tessellate-Imaging/monk_v1">Monk Library</a>.</p><h4>Step 2: Add to system path (Required for every terminal or kernel run)</h4><pre><strong>import</strong> <strong>sys</strong><br>sys.path.append(&quot;monk_v1/&quot;)</pre><h3>Demo of Zalando Clothing Store Classifier</h3><p>This section is to give you a demo of this classifier before getting into further details.</p><p>Let’s first download the weights.</p><pre>! wget --load-cookies /tmp/cookies.txt &quot;https://docs.google.com/uc?export=download&amp;confirm=$(wget --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate &#39;https://docs.google.com/uc?export=download&amp;id=1SO7GUcZlo8jRtLnGa6cBn2MGESyb1mUm&#39; -O- | sed -rn &#39;s/.*confirm=([0-9A-Za-z_]+).*/<strong>\1\n</strong>/p&#39;)&amp;id=1SO7GUcZlo8jRtLnGa6cBn2MGESyb1mUm&quot; -O cls_zalando_trained.zip &amp;&amp; rm -rf /tmp/cookies.txt</pre><p>Unzip the folder.</p><pre>! unzip -qq cls_zalando_trained.zip<br>ls workspace/</pre><p>Output: comparison/ Project-Zalando/ test/</p><p>There are three folders for you to explore:</p><ol><li>comparison — To check all the comparisons between different models and hyperparameters.</li></ol><p>2. Project-Zalando — Final weights and logs.</p><p>3. test — Images to test the model.</p><pre>ls workspace/Project-Zalando/</pre><p>Output: expert_mode_vgg16/</p><p>expert_mode_vgg16 is our final model.</p><pre><em>#Using keras backend </em><br><strong>from</strong> <strong>monk.keras_prototype</strong> <strong>import</strong> prototype</pre><h4>Infer</h4><pre>ktf = prototype(verbose=1)<br>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_vgg16&quot;, eval_infer=<strong>True</strong>)</pre><p>Give the image’s location.</p><pre>img_name = &quot;/content/workspace/test/0DB22O007-A11@8.jpg&quot;<br>predictions = ktf.Infer(img_name=img_name)</pre><pre><em>#Display </em><br><strong>from</strong> <strong>IPython.display</strong> <strong>import</strong> Image<br>Image(filename=img_name)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*FMdHooNn5fSh8KpY_lHVOA.png" /></figure><pre>img_name = &quot;/content/workspace/test/1FI21J00A-A11@10.jpg&quot;<br>predictions = ktf.Infer(img_name=img_name)</pre><pre><em>#Display </em><br><strong>from</strong> <strong>IPython.display</strong> <strong>import</strong> Image<br>Image(filename=img_name)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*Y_e6nS7NuNmh-M1pVfOqaw.png" /></figure><h3>Download Dataset</h3><p>Let’s install a dataset using Kaggle’s API Commands. Before doing that, follow the below steps:</p><p>Go to your Kaggle Profile &gt; My Account &gt; Scroll down to find <em>API</em> section &gt; Click on Expire API Token &gt; Now, click on <em>Create new API Token</em> &gt; Save <em>kaggle.json</em> on your local system.</p><pre>! pip install -q kaggle</pre><pre><strong>from</strong> <strong>google.colab</strong> <strong>import</strong> files</pre><pre># Upload your <em>kaggle.json</em> file here.<br>files.upload()</pre><pre>! mkdir ~/.kaggle</pre><pre>! cp kaggle.json ~/.kaggle/</pre><pre>! chmod 600 ~/.kaggle/kaggle.json</pre><p>Time for downloading your dataset. Go to the dataset you want to download on Kaggle and copy the API command which Kaggle provides. That should look like below:</p><pre>! kaggle datasets download -d dqmonn/zalando-store-crawl</pre><pre>! unzip -qq zalando-store-crawl.zip -d zalando</pre><p>After unzipping the file, store your dataset/files in your own <em>Google Drive</em> for future experiments.</p><pre>%cd /content/drive/My Drive/Data</pre><pre>%cp -av /content/zalando/zalando zalando</pre><h3>Background Work</h3><p><strong>1. Question</strong>: Which backend should I select to train my classifier?</p><p><strong>Answer</strong>: Follow <a href="https://github.com/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/1_getting_started_roadmap/2_elemental_features_of_monk/4)%20Feature%20-%20Compare%20experiments%20-%20compare%20experiments%20across%20backends.ipynb">this tutorial</a> to compare experiments across backends.</p><p><strong>2. Question</strong>: Which model should I select to train my classifier after selecting the backend?</p><p><strong>Answer</strong>: In the current Experiment, I’ve selected <strong>Keras</strong> backend to train my classifier. So, use the following code to list all the models which are available under Keras.</p><pre># Using keras backend <br>from keras_prototype import prototype<br> <br>ktf = prototype(verbose=1)<br>ktf.List_Models()<br> <br>Models List: <br>    1. mobilenet<br>    2. densenet121<br>    3. densenet169<br>    4. densenet201<br>    5. inception_v3<br>    6. inception_resnet_v3<br>    7. mobilenet_v2<br>    8. nasnet_mobile<br>    9. nasnet_large<br>    10. resnet50<br>    11. resnet101<br>    12. resnet152<br>    13. resnet50_v2<br>    14. resnet101_v2<br>    15. resnet152_v2<br>    16. vgg16<br>    17. vgg19<br>    18. xception</pre><p>Now, you can select any 3–5 models to start doing your experiments. Follow <a href="https://github.com/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/1_getting_started_roadmap/2_elemental_features_of_monk/3)%20Feature%20-%20Compare%20experiments%20-%20compare%20experiments%20within%20same%20backend.ipynb">this tutorial</a> to compare experiments within the same backend.</p><h3>Import Monk</h3><pre>#Using keras backend</pre><pre>from monk.keras_prototype import prototype</pre><p>You can create multiple experiments under one Project. Here, my project is named <strong>Project-Zalando,</strong> and my first Experiment is named as <strong>vgg16_exp1</strong>.</p><pre>ktf = prototype(verbose=1)</pre><pre>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;vgg16_exp1&quot;)</pre><p>Output:</p><pre>Keras Version: 2.3.1 Tensorflow Version: 2.2.0  <br>Experiment Details     <br>Project: Project-Zalando     <br>Experiment: vgg16_exp1     <br>Dir: /content/drive/My Drive/Monk_v1/workspace/Project-Zalando/vgg16_exp1/</pre><p>You can use the following code to train your model with default Parameters. However, our goal is to increase accuracy. Hence, we will jump to <em>tune our hyperparameters</em>. Use <a href="https://github.com/Tessellate-Imaging/monk_v1/tree/master/study_roadmaps/1_getting_started_roadmap/6_hyperparameter_tuning">this link</a> to learn how to do <strong>hyperparameter tuning</strong> for your classifier.</p><pre>ktf.Default(dataset_path=&quot;/content/drive/My Drive/Data/zalando&quot;, model_name=&quot;vgg16&quot;, freeze_base_network=False, num_epochs=5)</pre><pre>#Read the summary generated once you run this cell.</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2jpcoaNkrya91wZJQyD7Cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uDh9RmaqiM2stn2A6Tstag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vOVyzV6DFvfdlKI8DIKh5w.png" /></figure><pre>ktf.Train()</pre><h4>a. Analyze Learning Rates</h4><pre># Analysis Project Name<br>analysis_name = &quot;analyse_learning_rates_vgg16&quot;</pre><pre># Learning rates to explore<br>lrs = [0.1, 0.05, 0.01, 0.005, 0.0001]</pre><pre># Number of epochs for each sub-experiment to run<br>epochs=5</pre><pre># Percentage of original dataset to take in for experimentation<br># We&#39;re taking 5% of our original dataset.<br>percent_data=5</pre><pre># I made sure that all the GPU processors are running<br>ktf.update_num_processors(2)</pre><pre># Very important to reload post updating<br>ktf.Reload()</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-h4Au1mEC-o-k-iUNsPUw.png" /></figure><pre># &quot;keep_all&quot; - Keep all the sub experiments created<br># &quot;keep_none&quot; - Delete all sub experiments created</pre><pre>analysis = ktf.Analyse_Learning_Rates(analysis_name, lrs, percent_data, num_epochs=epochs, state=&quot;keep_none&quot;)</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*6UjcKf9Troc5vP5-Sa7X3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*1B5XWH0AJI6nxtXrEaN_-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*LuweuzXQ4oxwDWgJqWeC6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*v3ivaTENGIi3CHnTe_VjSw.png" /></figure><h4>Result</h4><p>From the above table, it is clear that Learning_Rate_0.0001 has the <strong>least validation loss</strong>. We will update our learning rate with this.</p><pre>ktf.update_learning_rate(0.0001)<br><em># Very important to reload post updates</em> ktf.Reload()</pre><h4>b. Analyze Batch sizes</h4><pre># Analysis Project Name<br>analysis_name = &quot;analyse_batch_sizes_vgg16&quot;</pre><pre># Batch sizes to explore<br>batch_sizes = [2, 4, 8, 12]</pre><pre># <strong>Note:</strong> We&#39;re using the same percent_data and num_epochs.<br># &quot;keep_all&quot; - Keep all the sub experiments created<br># &quot;keep_none&quot; - Delete all sub experiments created</pre><pre>analysis_batches = ktf.Analyse_Batch_Sizes(analysis_name, batch_sizes, percent_data, num_epochs=epochs, state=&quot;keep_none&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*0M3j6aQ3PFKwjzFQaIn3eg.png" /></figure><h4>Result</h4><p>From the above table, it is clear that Batch_Size_12 has the <strong>least validation loss</strong>. We will update the model with this.</p><pre>ktf.update_batch_size(12)</pre><pre># Very important to reload post updates<br>ktf.Reload()</pre><h4>c. Analyse Optimizers</h4><pre># Analysis Project Name<br>analysis_name = &quot;analyse_optimizers_vgg16&quot;</pre><pre># Optimizers to explore<br>optimizers = [&quot;sgd&quot;, &quot;adam&quot;, &quot;adagrad&quot;]</pre><pre># &quot;keep_all&quot; - Keep all the sub experiments created<br># &quot;keep_non&quot; - Delete all sub experiments created</pre><pre>analysis_optimizers = ktf.Analyse_Optimizers(analysis_name, optimizers, percent_data, num_epochs=epochs, state=&quot;keep_none&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*8gfAUm-mTgR-Xzt6CZzL_A.png" /></figure><h4>Result</h4><p>From the above table, it is clear that we should go for Optimizer_adagrad since it has the least validation loss.</p><h4>Summary of Hyperparameter Tuning Experiment</h4><p>Here ends our Experiment, and now it’s time to switch on the <strong>Expert Mode</strong> to train our classifier using the above <strong>Hyperparameters</strong>.</p><p>Summary:</p><ul><li>Learning Rate — 0.0001</li><li>Batch size — 12</li><li>Optimizer — adagrad</li></ul><h3>1. Training from scratch: vgg16</h3><h4>Expert Mode</h4><p>Let’s create another <em>Experiment</em> named <strong>expert_mode_vgg16</strong> and train our classifier from scratch.</p><pre>ktf = prototype(verbose=1)</pre><pre>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_vgg16&quot;)</pre><pre>ktf.Dataset_Params(dataset_path=&quot;/content/drive/My Drive/Data/zalando&quot;, split=0.8, input_size=224, batch_size=12, shuffle_data=True, num_processors=2)</pre><pre># Load the dataset<br>ktf.Dataset()</pre><pre>ktf.Model_Params(model_name=&quot;vgg16&quot;, freeze_base_network=True, use_gpu=True, use_pretrained=True)</pre><pre>ktf.Model()</pre><pre>ktf.Training_Params(num_epochs=5, display_progress=True, display_progress_realtime=True, save_intermediate_models=True, intermediate_model_prefix=&quot;intermediate_model_&quot;, save_training_logs=True)</pre><pre># Update optimizer and learning rate<br>ktf.optimizer_adagrad(0.0001)</pre><pre>ktf.loss_crossentropy()</pre><pre># Training<br>ktf.Train()</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1QJHJwYHztqJRPvCUFXuSA.png" /></figure><h4>Validation</h4><pre>ktf = prototype(verbose=1);</pre><pre>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_vgg16&quot;, eval_infer=True)</pre><pre># Just for example purposes, validating on the training set itself<br>ktf.Dataset_Params(dataset_path=&quot;/content/drive/My Drive/Data/zalando&quot;)</pre><pre>ktf.Dataset()</pre><pre>accuracy, class_based_accuracy = ktf.Evaluate()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*ZsErUBr_xjSOT9CZl4WXbg.png" /></figure><h4>Inference</h4><p>Let’s see the Prediction on sample images.</p><pre>ktf = prototype(verbose=1)</pre><pre>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_vgg16&quot;, eval_infer=True)</pre><p>The model is now loaded.</p><pre>img_name = &quot;/content/1FI21J00A-A11@10.jpg&quot;<br>predictions = ktf.Infer(img_name=img_name)</pre><pre><em>#Display </em><br><strong>from</strong> <strong>IPython.display</strong> <strong>import</strong> Image<br>Image(filename=img_name)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*cGSb5ZND9kM_N9V3rA7fmQ.png" /></figure><p>We’ve successfully completed training our classifier. Check the <em>logs</em> and <em>models</em> folder under this Experiment to see the model weights and other insights.</p><h3>2. Training from scratch: mobilenet_v2</h3><p>I have gone ahead and trained mobilenet_v2 from scratch in the same way to compare vgg16 and mobilenet_v2.</p><p>After the Experiment, the best hyperparameters for mobilenet_v2 are:</p><ul><li>Learning Rate — 0.0001</li><li>Batch Size — 8</li><li>Optimizer — adam</li></ul><h4>Expert Mode</h4><pre>ktf = prototype(verbose=1)<br>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_mobilenet_v2&quot;)</pre><pre>ktf.Dataset_Params(dataset_path=&quot;/content/drive/My Drive/Data/zalando&quot;, split=0.8, input_size=224, batch_size=8, shuffle_data=True, num_processors=2)</pre><pre>ktf.Dataset()</pre><pre>ktf.Model_Params(model_name=&quot;mobilenet_v2&quot;, freeze_base_network=True, use_gpu=True, use_pretrained=True)</pre><pre>ktf.Model()</pre><pre>ktf.Training_Params(num_epochs=5, display_progress=True, display_progress_realtime=True, save_intermediate_models=True, intermediate_model_prefix=&quot;intermediate_model_&quot;, save_training_logs=True)</pre><pre>ktf.optimizer_adam(0.0001)</pre><pre>ktf.loss_crossentropy()</pre><pre>ktf.Train()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2IsjvIkpcnL30OGzmjuKvA.png" /></figure><h4>Validation</h4><pre>ktf = prototype(verbose=1)<br>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_mobilenet_v2&quot;, eval_infer=True)</pre><pre># Just for example purposes, validating on the training set itself<br>ktf.Dataset_Params(dataset_path=&quot;/content/drive/My Drive/Data/zalando&quot;)</pre><pre>ktf.Dataset()</pre><pre>accuracy, class_based_accuracy = ktf.Evaluate()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*oteCVrNMXYj6nOUMHUvWMg.png" /></figure><h4>Inference</h4><pre>ktf = prototype(verbose=1)</pre><pre>ktf.Prototype(&quot;Project-Zalando&quot;, &quot;expert_mode_mobilenet_v2&quot;, eval_infer=True)</pre><p>The model is now loaded.</p><pre>img_name = &quot;/content/0DB22O007-A11@8.jpg&quot;<br>predictions = ktf.Infer(img_name=img_name)</pre><pre>#Display<br>from IPython.display import Image<br>Image(filename=img_name)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*h9NSFUg9wx-bJoHZloW4zg.png" /></figure><pre>img_name = &quot;/content/TOB22O01W-A11@8.jpg&quot;<br>predictions = ktf.Infer(img_name=img_name)</pre><pre>#Display<br>from IPython.display import Image<br>Image(filename=img_name)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*TrF6DysuDUx6agGlvSHlJg.png" /></figure><h3>Comparing vgg16 and mobilenet_v2</h3><p>I’ve used <a href="https://github.com/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/1_getting_started_roadmap/2_elemental_features_of_monk/4)%20Feature%20-%20Compare%20experiments%20-%20compare%20experiments%20across%20backends.ipynb">the same tutorial</a>, which I mentioned previously, to compare these two experiments.</p><pre># Invoke the comparison class<br># import monk_v1<br>from compare_prototype import compare</pre><pre># Create a project<br>ctf = compare(verbose=1)<br>ctf.Comparison(&quot;vgg-mobilenet-Comparison&quot;)</pre><pre>ctf.Add_Experiment(&quot;Project-Zalando&quot;, &quot;expert_mode_vgg16&quot;)<br>ctf.Add_Experiment(&quot;Project-Zalando&quot;, &quot;expert_mode_mobilenet_v2&quot;)</pre><pre>ctf.Generate_Statistics()</pre><p>After the statistics are generated,</p><pre>from IPython.display import Image</pre><pre>Image(filename=&quot;/content/drive/My Drive/Monk_v1/workspace/comparison/vgg-mobilenet-Comparison/train_accuracy.png&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2unBWJJ4jtWaNVWf3XLuQ.png" /></figure><pre>from IPython.display import Image</pre><pre>Image(filename=&quot;/content/drive/My Drive/Monk_v1/workspace/comparison/vgg-mobilenet-Comparison/train_loss.png&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogvs_I4y1T-jIQPEAfgMSA.png" /></figure><pre>from IPython.display import Image</pre><pre>Image(filename=&quot;/content/drive/My Drive/Monk_v1/workspace/comparison/vgg-mobilenet-Comparison/val_accuracy.png&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n4c7Rhl43yetN0cwoELHQw.png" /></figure><pre>from IPython.display import Image</pre><pre>Image(filename=&quot;/content/drive/My Drive/Monk_v1/workspace/comparison/vgg-mobilenet-Comparison/val_loss.png&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6vA6S-KXTtS7v6wrRYLsPQ.png" /></figure><pre>from IPython.display import Image</pre><pre>Image(filename=&quot;/content/drive/My Drive/Monk_v1/workspace/comparison/vgg-mobilenet-Comparison/stats_training_time.png&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2pYmfOTq4XHsKsPkgAvRg.png" /></figure><pre>from IPython.display import Image</pre><pre>Image(filename=&quot;/content/drive/My Drive/Monk_v1/workspace/comparison/vgg-mobilenet-Comparison/stats_best_val_acc.png&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvjI0Yz_MjZjHbcXukNc_A.png" /></figure><h3>Conclusion</h3><p>From the above comparisons, it is clear that the model vgg16 performed better in every aspect.</p><p>There is a lot of room for improving the model’s accuracy by further tuning the hyperparameters. Please refer to <a href="https://github.com/Tessellate-Imaging/monk_v1/tree/master/study_roadmaps/4_image_classification_zoo">Image Classification Zoo</a> for more tutorials.</p><p>Tutorial available on <a href="https://github.com/Tessellate-Imaging/monk_v1/blob/master/study_roadmaps/4_image_classification_zoo/Classifier%20-%20Zalando%20Clothing%20Store.ipynb">GitHub</a>. Please Clap or Share this article if it helped you learn something!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18ce2d8a6418" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/image-classifier-zalando-clothing-store-using-monk-library-18ce2d8a6418">Image Classifier — Zalando Clothing Store using Monk Library</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tweet Analysis in just < 100 lines of code using Twint, TextHero, SweetViz Python Libraries!]]></title>
            <link>https://medium.com/analytics-vidhya/tweet-analysis-in-just-100-lines-of-code-using-twint-texthero-sweetviz-python-libraries-2c5813cf4d74?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c5813cf4d74</guid>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[text-analysis]]></category>
            <category><![CDATA[twint]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Mon, 13 Jul 2020 20:04:19 GMT</pubDate>
            <atom:updated>2020-07-16T14:47:43.579Z</atom:updated>
            <content:encoded><![CDATA[<p>The full code is available on <a href="https://github.com/vidyap-xgboost/DataScience-ML_Projects/blob/master/twitter_data_twint_sweetviz_texthero.ipynb">GitHub</a>, <a href="https://colab.research.google.com/drive/17nwWFe478Lc0-xzrMW3lVnwCTCNja5vJ?usp=sharing">Colab</a>, and <a href="https://www.kaggle.com/vidyapb/nlp-with-texthero-eda-with-sweetviz">Kaggle</a>.</p><p>This article is about analysing tweets starting from collecting twitter data (NO API, NO LIMITATIONS!) till visualizing tweets with PCA and K-Means in less than 100 lines of code (hopefully!) using some lesser-known libraries like <strong>Twint, TextHero, </strong>and<strong> SweetViz!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQReNe9KUzB1CbhRSx_4qQ.png" /><figcaption>TextHero, Twint, SweetViz</figcaption></figure><h4>Table of Contents:</h4><ul><li><a href="#39c1"><strong>Scraping Twitter Data using Twint</strong></a></li><li><a href="#6437"><strong>Reading Data using Pandas</strong></a></li><li><a href="#1862"><strong>Install and Import TextHero</strong></a></li><li><a href="#411f"><strong>TextHero for quick cleaning of Raw Text Data</strong></a></li><li><a href="#36e7"><strong>EDA and Basic Visualization with SweetViz</strong></a></li><li><a href="#3f47"><strong>Convert timezones from UTC to IST using pytz</strong></a></li><li><a href="#53dc"><strong>Visualizations using TextHero</strong></a></li><li><a href="#86bb"><strong>What else?</strong></a></li><li><a href="http://a957/"><strong>Next Steps</strong></a></li></ul><p>Let’s start right away.</p><h3>0. Scraping Twitter Data using Twint</h3><p>Let’s collect data from twitter using <a href="https://github.com/twintproject/twint"><strong>twint</strong></a> library.</p><p><strong>Question 1:</strong> Why are we using <strong>twint</strong> instead of <strong>Twitter’s Official API</strong>?</p><p><strong>Ans:</strong> Because twint requires no authentication, no API, and importantly no limits.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f7e204ab59833e091e6ded0f87c6811/href">https://medium.com/media/1f7e204ab59833e091e6ded0f87c6811/href</a></iframe><h3>1. Reading Data using Pandas</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0d4e9cb25e1fadc27d7a2da6422074d/href">https://medium.com/media/f0d4e9cb25e1fadc27d7a2da6422074d/href</a></iframe><p>Example output would look like this:</p><pre>--------------------------------------------------------------------<br>Dataframe Info: <br>--------------------------------------------------------------------<br>&lt;class &#39;pandas.core.frame.DataFrame&#39;&gt;<br>RangeIndex: 7043 entries, 0 to 7042<br>Data columns (total 33 columns):<br> #   Column           Non-Null Count  Dtype         <br>---  ------           --------------  -----         <br> 0   date_time        7043 non-null   datetime64[ns]<br> 1   id               7043 non-null   int64         <br> 2   conversation_id  7043 non-null   int64         <br> 3   created_at       7043 non-null   int64         <br> 4   timezone         7043 non-null   object        <br> 5   user_id          7043 non-null   int64         <br> 6   username         7043 non-null   object        <br> 7   name             7043 non-null   object        <br> 8   place            0 non-null      float64       <br> 9   tweet            7043 non-null   object        <br> 10  mentions         7043 non-null   object        <br> 11  urls             7043 non-null   object        <br> 12  photos           7043 non-null   object        <br> 13  replies_count    7043 non-null   int64         <br> 14  retweets_count   7043 non-null   int64         <br> 15  likes_count      7043 non-null   int64         <br> 16  hashtags         7043 non-null   object        <br> 17  cashtags         7043 non-null   object        <br> 18  link             7043 non-null   object        <br> 19  retweet          7043 non-null   bool          <br> 20  quote_url        253 non-null    object        <br> 21  video            7043 non-null   int64         <br> 22  near             0 non-null      float64       <br> 23  geo              0 non-null      float64       <br> 24  source           0 non-null      float64       <br> 25  user_rt_id       0 non-null      float64       <br> 26  user_rt          0 non-null      float64       <br> 27  retweet_id       0 non-null      float64       <br> 28  reply_to         7043 non-null   object        <br> 29  retweet_date     0 non-null      float64       <br> 30  translate        0 non-null      float64       <br> 31  trans_src        0 non-null      float64       <br> 32  trans_dest       0 non-null      float64       <br>dtypes: bool(1), datetime64[ns](1), float64(11), int64(8), object(12)<br>memory usage: 1.7+ MB</pre><pre>None</pre><p>A little more pre-processing if you need. Otherwise, skip the below code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/529fa6862f9865cbaeab1388e72a70ee/href">https://medium.com/media/529fa6862f9865cbaeab1388e72a70ee/href</a></iframe><p>Output:</p><pre>&lt;class &#39;pandas.core.frame.DataFrame&#39;&gt;<br>RangeIndex: 7043 entries, 0 to 7042<br>Data columns (total 12 columns):<br> #   Column          Non-Null Count  Dtype         <br>---  ------          --------------  -----         <br> 0   date_time       7043 non-null   datetime64[ns]<br> 1   username        7043 non-null   object        <br> 2   tweet           7043 non-null   object        <br> 3   mentions        7043 non-null   object        <br> 4   urls            7043 non-null   object        <br> 5   photos          7043 non-null   object        <br> 6   replies_count   7043 non-null   int64         <br> 7   retweets_count  7043 non-null   int64         <br> 8   likes_count     7043 non-null   int64         <br> 9   hashtags        7043 non-null   object        <br> 10  link            7043 non-null   object        <br> 11  reply_to        7043 non-null   object        <br>dtypes: datetime64[ns](1), int64(3), object(8)<br>memory usage: 660.4+ KB</pre><pre>None</pre><h3>2. Install and Import TextHero</h3><p>Here, we will be using <a href="https://github.com/jbesomi/texthero"><strong>TextHero</strong></a>, a python package to work efficiently and quickly with text data. You can think of texhero as scikit-learn for text-based dataset.</p><p><strong>Question 2:</strong> Why are we using TextHero instead of doing it from scratch using libraries like Gensim or other tools?</p><p><strong>Ans:</strong> TextHero automates the cleaning process with one method, which is pretty effective. If the text needs to be cleaned further, we can do so by manually writing code to remove those unwanted words. In the backend, it uses libraries like Spacy, Gensim, tqdm,regex, nltk. So you don’t have to import all those separately when you use TextHero.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/752081219f8d3264f5043536a8f25184/href">https://medium.com/media/752081219f8d3264f5043536a8f25184/href</a></iframe><h3>3. TextHero for quick cleaning of raw text data.</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f29468417ade68d82926d3941fb5382/href">https://medium.com/media/2f29468417ade68d82926d3941fb5382/href</a></iframe><h3>4. EDA and Basic Visualization with Sweetviz</h3><p><strong>Question 3:</strong> Why are we using <a href="https://github.com/fbdesignpro/sweetviz"><strong>Sweetviz</strong></a> instead of matplotlib or plotly or bokeh for Exploratory Data Analysis?</p><p><strong>Ans</strong>: Sweetviz is an open-source Python library that generates beautiful, high-density visualizations to kickstart EDA (Exploratory Data Analysis) with a single line of code. Output is a fully self-contained HTML application.</p><p>The system is built around quickly visualizing target values and comparing datasets. Its goal is to help quick analysis of target characteristics, training vs testing data, and other such data characterization tasks.</p><p><a href="http://cooltiming.com/SWEETVIZ_REPORT.html">See example report generated by sweetviz from the titanic dataset HERE</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1dc024ebb3a830925ddc8d17bd0a82e/href">https://medium.com/media/c1dc024ebb3a830925ddc8d17bd0a82e/href</a></iframe><p>Creating another data frame df1for further analysis.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9aadaf5995eadc40f777cc7338f37cbf/href">https://medium.com/media/9aadaf5995eadc40f777cc7338f37cbf/href</a></iframe><p>A lot of information can be analyzed and understood from just one HTML Report before we do any further analysis.</p><p>Example Screenshots:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*_zb5fv_VXuszFTzj0AIPpg.png" /><figcaption>Correlation Matrix between columns.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bUTKJppLPioNLqU1Igi2_Q.png" /><figcaption>Most repeated words displayed on the left.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-DSC2Mi8yNQX08xWLHRoKA.png" /><figcaption>Users @elonmusk mostly tags or converses with.</figcaption></figure><h3>5. Convert timezone UTC to IST using pytz</h3><p>This step can be avoided if you wish so, however, I would like to show you how you can convert UTC timezone to your local timezone in case you’re doing timeseries analysis.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a965d2e541edda8d1e00d4a783a8ae2/href">https://medium.com/media/5a965d2e541edda8d1e00d4a783a8ae2/href</a></iframe><h3>6. Visualizations using TextHero for further insights</h3><p>There are some pretty cool visualizations you can explore with TextHero.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7408ba2e48b68b166b2cae239edf0331/href">https://medium.com/media/7408ba2e48b68b166b2cae239edf0331/href</a></iframe><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7WUNhPdwiwaCk_C7Otflqg.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce482d69c3f43af2230e5ef3262e09ad/href">https://medium.com/media/ce482d69c3f43af2230e5ef3262e09ad/href</a></iframe><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97i80omI3PThY62r77-OOg.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0faa020ab9ebb50b5c4671c9f10fbf07/href">https://medium.com/media/0faa020ab9ebb50b5c4671c9f10fbf07/href</a></iframe><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*eZUYKQp089607PO5tI_B2Q.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7011628c5aad186fc86f4eddbfa47735/href">https://medium.com/media/7011628c5aad186fc86f4eddbfa47735/href</a></iframe><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*XmEJ2GShX-Qbx3_cslbIew.png" /></figure><h3>7. Other Visualizations for further analysis</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26a7687abbb9d423890596421ee280c0/href">https://medium.com/media/26a7687abbb9d423890596421ee280c0/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hrtjHtyEBh_O0nmBtx-gA.png" /><figcaption>Retweets over time.</figcaption></figure><p>Repeat the above code for replies_count and likes_count .</p><h3>What else?</h3><p>You can check other libraries like <a href="https://github.com/huggingface"><strong>huggingface</strong></a> for NLP, <a href="https://github.com/sdispater/pendulum"><strong>pendulum</strong></a> if you’re dealing with dates &amp; time, and<strong> </strong><a href="https://github.com/vaexio/vaex"><strong>Vaex</strong></a> if you’re dealing with large datasets.</p><h3>Next Steps</h3><ul><li>Build a Topic Model and check if you can categorize @elonmusk’s tweets into different categories.</li><li>Sentiment Analysis on his tweets.</li><li>How the sentiment is changing over time.</li><li>Take recent stocks data on TSLA and check if his tweets are influencing the TSLA stock or other stocks.</li></ul><p>The full code is available on <a href="https://github.com/vidyap-xgboost/DataScience-ML_Projects/blob/master/twitter_data_twint_sweetviz_texthero.ipynb">GitHub</a>, <a href="https://colab.research.google.com/drive/17nwWFe478Lc0-xzrMW3lVnwCTCNja5vJ?usp=sharing">Colab</a>, and <a href="https://www.kaggle.com/vidyapb/nlp-with-texthero-eda-with-sweetviz">Kaggle</a>.</p><p>Please give a star for this repository and a <strong>clap </strong>here if it helped you and raise issues if you find any. Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c5813cf4d74" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/tweet-analysis-in-just-100-lines-of-code-using-twint-texthero-sweetviz-python-libraries-2c5813cf4d74">Tweet Analysis in just &lt; 100 lines of code using Twint, TextHero, SweetViz Python Libraries!</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Cool Projects you can work with to improve your Data Science Skills]]></title>
            <link>https://medium.com/fiolabs-datascience/5-cool-projects-you-can-work-with-to-improve-your-data-science-skills-13068d5166cd?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/13068d5166cd</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Thu, 28 May 2020 10:25:37 GMT</pubDate>
            <atom:updated>2020-05-28T10:31:38.426Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*6zue8tZYXodEOE5nUe0T3A.png" /></figure><p>There has been a lot of activity among fresher’s recently, especially in the Data Science community, where they are trying to make the best out of these hard times by enrolling in courses one after the other. It shows us how much they love the profession and want to improve their skills to get better opportunities.</p><p>I hope to see this trend of learning and keeping themselves up-to-date continue after the lockdown period.</p><p>Going back to enrolling for courses, reading theory, practicing on some very well known datasets like visualizing Iris species, predicting housing prices or pneumonia infected children, etc., can be very useful, but does it make you unique? How will you stand out if you are filling the resume with the same kind of projects which everyone has already done? What can you do so that you use your skills and apply them to real-world problems? How can you contribute to the Data Science community?</p><p>In today’s post, I will be introducing you to a few <strong>Open Source projects</strong> <strong>where</strong> <strong>you</strong> <strong>can learn, contribute,</strong> and, of course, stand out from the rest! Read on to find out what they are.</p><h3>The Algorithms/Python</h3><p>GitHub’s most extensive open-source algorithm library. This is beginner-friendly, and it has the repositories not just for Python but other languages like Java, C++, C, Go, JavaScript, Scala, Swift, R, MATLAB, and many more for you to contribute!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZfytnqCTPCLtedTBK4k5A.png" /><figcaption>Contributions from 2016–2020. Pretty active!</figcaption></figure><p>In Python’s repository alone, there are 472 contributors and around 500 Algorithms explained with problems and solutions! There are 22,000+ forks and people are still contributing to this repository. This is one of the best places to start learning, connecting with the community, as well as contributing to the community! Please check out the links provided below to read about them and start right away!</p><p><a href="https://github.com/TheAlgorithms/Python"><strong>GitHub</strong></a><strong> | </strong><a href="https://thealgorithms.github.io/"><strong>Website</strong></a><strong> | </strong><a href="https://github.com/TheAlgorithms/Python/blob/master/DIRECTORY.md"><strong>List of Algorithms/Python</strong></a></p><h3>Jukebox</h3><p>I started keeping a lookout for OpenAI’s work since the day they released <a href="https://openai.com/blog/better-language-models/"><strong>GPT-2</strong></a><strong> </strong>(a model which simply predicts the next word given a string of words based on the context, how cool is that?).</p><p>Recently, they’ve open-sourced what they call as <strong>Jukebox</strong>. If you’re a music fan, you can intuitively understand that this is a neural network model that can generate music with singing in the raw audio domain.</p><p>This model was trained on a dataset of 1.2 million songs (600,000 of which are in English), paired with corresponding lyrics and metadata from LyricWiki. They also trained this on a 32-bit, 44.1 kHz raw audio, and performed data augmentation by randomly downmixing the right and left channels to produce mono audio.</p><p>If you want to play with <strong>Jukebox</strong>, all you’ve to do is provide a genre, an artist, and lyrics as input, and the neural network does the job for you in creating new music that takes the sample from the given input. The range of music Jukebox can generate is staggering!</p><p>Check out the below video, which contains the music and lyrics created by this artificially intelligent musician!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1aO-uHXbzmQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1aO-uHXbzmQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1aO-uHXbzmQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/16bb2d37fb59c3fae6e335874eccc292/href">https://medium.com/media/16bb2d37fb59c3fae6e335874eccc292/href</a></iframe><p>If you’re excited about testing this for yourself, go to the links provided below to read more about it and try it on Google Colab!</p><p><a href="https://github.com/openai/jukebox"><strong>Code</strong></a><strong> | </strong><a href="https://openai.com/blog/jukebox/"><strong>Blog</strong></a><strong> | </strong><a href="https://arxiv.org/abs/2005.00341"><strong>Paper</strong></a><strong> | </strong><a href="https://colab.research.google.com/github/openai/jukebox/blob/master/jukebox/Interacting_with_Jukebox.ipynb"><strong>Google Colab</strong></a><strong> | </strong><a href="https://jukebox.openai.com/"><strong>Explorer</strong></a><strong> (test)</strong></p><h3>BlenderBot</h3><p>Facebook AI has <a href="https://l.facebook.com/l.php?u=https%3A%2F%2Farxiv.org%2Fabs%2F2004.13637&amp;h=AT3TQWdhHb5uh76575Hgk60Of15grM9PeU-BYWc4bH29d8pJaZz0j0O6W3vf_2kRXmLxHkv4VqOuNjOPTxcsOpnpeOHunMOwbpdEbB7yZubM0qYIEI7x1zucnODMWjycv8TbWQ">built</a> and <a href="https://l.facebook.com/l.php?u=https%3A%2F%2Fparl.ai%2Fprojects%2Frecipes%2F&amp;h=AT0tHnprjuMStgEhV2-xwDKWhL-hr38y0vPhY5h46Zeh2uMxQFb-Y8sbaykkq-hY8vIwafkaG8_BkcOzXozHc-WRP0St8MQodX49GiAFrw6FLqq7cfzlLPqktaxHyfmDYhGS-w">open-sourced</a> BlenderBot, the largest-ever open-domain chatbot. It outperforms others in terms of engagement and also feels more human, according to human evaluators. The culmination of years of research in conversational AI, this is the first chatbot to blend a diverse set of conversational skills — including empathy, knowledge, and personality — together in one system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xkq76p8O8vK5wTBr0UljVw.jpeg" /></figure><p>See the trend of advancement in Conversational AI Bot on Facebook!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1IrQlzUOZ5_U3ggLWyUO-Q.png" /></figure><p>Read the above conversation between a human(left) and BlenderBot(right). Noticed the ending? Shocking results.</p><p>They achieved this milestone through a new chatbot recipe that includes improved decoding techniques, a novel blending of skills, and a model with 9.4 billion parameters, which is 3.6x more than the largest existing system. Watch the video to see how BlenderBot sounds just like a human!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*-UtZAIzATIZzEEqapogPlw.png" /></figure><p>Check out the below links for more information on how you can play with it!</p><p><a href="https://parl.ai/projects/recipes/"><strong>Code</strong></a><strong> | </strong><a href="https://ai.facebook.com/blog/state-of-the-art-open-source-chatbot"><strong>Blog</strong></a><strong> | </strong><a href="https://arxiv.org/abs/2004.13637"><strong>Paper</strong></a></p><h3>Portrait to Cartoon (Photo to Cartoon)</h3><p>If you have Mobile Apps like TikTok, Snapchat, Instagram, BeautyPlus, etc., you’d be familiar with what I mean by “filters” — ever wondered how they create these amazing and perfect filters for faces? Most of them use Convolutional Neural Networks (CNN) but nowadays, using Generative Adversarial Networks (GAN) has also become commonplace.</p><p>In this project, you’ll find that a photo that contains a face is immediately turned into a cartoon. They used the Generative Adversarial Network method to realize the mapping of pictures to comics.</p><p>The results of CycleGAN, a classic unpaired image translation method, often have obvious artifacts and are unstable. Recently, Kim et al. propose a novel normalization function (AdaLIN) and an attention module in the paper “U-GAT-IT” and achieve excellent selfie2anime results.</p><p>You can also train your images following the instructions given in their repo. They also provided an official blog to test the images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtXrhFVwXMm-dwZlXxOSKw.png" /><figcaption>Original Image (left) vs. Transformed Image into Anime (right)</figcaption></figure><p><a href="https://github.com/minivision-ai/photo2cartoon/blob/master/README_EN.md"><strong>Code</strong></a><strong> | </strong><a href="https://ai.minivision.cn/#/coreability/cartoon"><strong>Blog</strong></a></p><h3>3D Photography using Context-aware Layered Depth Inpainting</h3><p>This paper was recently presented in IEEE Conference, 2020. This model takes a single RGB-D image as an input and converts it into a 3D photo!</p><p>It is a multi-layer representation that contains hallucinated colour and depth structures in regions occluded in the original view. They used a Layered Depth Image with explicit pixel connectivity as underlying representation and presented a learning-based inpainting model that iteratively synthesizes new local colour-and-depth content into the occluded region in a spatial context-aware manner.</p><p>You’ll get stunning results, as shown in the below video. It also looks realistic when you zoom in! They even provide a Google Colab link for you to test on immediately. Check out the links provided.</p><p>Visualizing history in 3D:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrHnOr3oZ5VI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrHnOr3oZ5VI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrHnOr3oZ5VI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/220bfa6c9b375488e8b90fe7f7419298/href">https://medium.com/media/220bfa6c9b375488e8b90fe7f7419298/href</a></iframe><p>Zoom in 3D:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAtsQvm5U_2o%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAtsQvm5U_2o&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAtsQvm5U_2o%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d388534e7304b41ed485e5379cc88ad5/href">https://medium.com/media/d388534e7304b41ed485e5379cc88ad5/href</a></iframe><p><a href="https://github.com/vt-vl-lab/3d-photo-inpainting"><strong>Code</strong></a><strong> | </strong><a href="https://shihmengli.github.io/3D-Photo-Inpainting/"><strong>Blog</strong></a><strong> | </strong><a href="https://arxiv.org/abs/2004.04727"><strong>Paper</strong></a><strong> | </strong><a href="https://colab.research.google.com/drive/1706ToQrkIZshRSJSHvZ1RuCiM__YX3Bz"><strong>Google Colab</strong></a></p><p>These projects can be of great help to build your resume and impress your recruiters. Not only that, you’d be staying up to date with what’s happening in the world of AI and Data Science. I hope you found these projects interesting, let us know which one you are interested and would be willing to try in the comments section. And as always, feel free to reach out to us with any questions or concerns and we’d love to help you out wherever we can!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*pEer9aHmWZ7DRVTcKblnMg.png" /><figcaption><a href="http://www.fiolabs.ai/">www.fiolabs.ai</a></figcaption></figure><h3>What are you waiting for?</h3><p>We believe FIO Labs never fails to keep their promise when it comes to providing quality services. Our enterprise expertise and industry leadership mean you’re in safe hands.</p><p>If you are interested in learning more about what we do at FIO Labs or have some questions about this page, feel free to send us a message to <a href="/service/mailto:contact@fiolabs.ai">contact@fiolabs.ai</a> — we’d love to hear from you.</p><h3>How to reach FIO Labs:</h3><p><strong><em>Leave a comment below | </em></strong><a href="https://calendly.com/saga9/30min?month=2020-04"><strong><em>Book a FREE 30-min session for our on-going Pro Bono Services</em></strong></a><strong><em> or </em></strong><a href="https://www.linkedin.com/posts/fiolabs_pro-bono-ai-support-services-activity-6651785903175983104-c0ww"><strong><em>Fill in our LinkedIn Form</em></strong></a><strong><em>| </em></strong><a href="https://www.fiolabs.ai/contact"><strong><em>Contact Us</em></strong></a><strong><em> | </em></strong><a href="https://www.fiolabs.ai/about"><strong><em>About FIO Labs</em></strong></a><strong><em> | </em></strong><a href="https://www.fiolabs.ai/blog/"><strong><em>Blog</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13068d5166cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fiolabs-datascience/5-cool-projects-you-can-work-with-to-improve-your-data-science-skills-13068d5166cd">5 Cool Projects you can work with to improve your Data Science Skills</a> was originally published in <a href="https://medium.com/fiolabs-datascience">fiolabs-datascience</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Alan Turing’s “Computing Machinery and Intelligence”: Paper Talk by Lex Fridman]]></title>
            <link>https://vidyapb.medium.com/alan-turings-computing-machinery-and-intelligence-paper-talk-by-lex-fridman-21990157ff70?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/21990157ff70</guid>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Tue, 12 May 2020 09:07:54 GMT</pubDate>
            <atom:updated>2020-05-12T09:07:54.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bee1Uq0NJBNYeg-0l-iwdQ.jpeg" /></figure><p>Lex Friedman, the owner of <a href="https://www.youtube.com/channel/UCSHZKyawb77ixDdsGog4iWA">this</a> Youtube Channel, who regularly hosts podcasts and other courses on Artificial Intelligence decided to start a Paper Club on his <a href="https://discord.gg/lex-ai">Discord Channel</a>. If you haven’t watched this discussion on <a href="https://www.youtube.com/watch?v=MGW_Qcqr9eQ">YouTube show</a>, I highly recommend you watching that right now. But, if you’re like me, who’d rather read things, then keep reading. I tried to keep the discussion as simple as I can.</p><p>This week’s discussion was on the famous paper published by Alan Turing —<a href="https://phil415.pbworks.com/f/TuringComputing.pdf"> “Computing Machinery and Intelligence”</a>. Alan Turing, as we all know, has become popular for the <strong>Turing Test</strong>. It has been an important test for several years to measure the progress of machines and their intelligence compared to humans. Recently, many companies who are actively researching on AI have stopped considering passing the Turing Test. They don’t think it is really that important. Let’s see why is that.</p><p>The discussion started with the opening lines of the paper. Alan Turing asks a simple question, <strong>“Can machines think?”</strong></p><p>This makes you suddenly aware of the questions “What do you mean by machines?” and “What do you mean by think?” Should we go with what the dictionary says or should we explore deeply, in a philosophical way? That’s how the famous <strong>Imitation Game/Turing Test</strong> was popularized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70Q05sQwRaJWAEhN9eBWxg.jpeg" /></figure><p>Turing claims <strong>Imitation Game</strong> is a good test to measure a machine’s intelligence.</p><p>An interrogator or a judge has to ask questions to the computer and if a computer can fool the judge in making him/her think it is a human, then we can say that the computer has passed Turing Test.</p><p>This makes us question how far have we come in Natural Language Processing? Where do we stand when it comes to ChatBots? What are the metrics used to compare one chatbot with another? What are the leading Chatbots right now that comes closer to having a conversation like a human?</p><p><strong>Open Question 1: Is it possible to create a convincing test or will humans always raise the bar?</strong></p><p>One of the predictions of Turing is that the phrase “<strong>thinking machine</strong>” will no longer be contradictory by 2000. Do we really accept that the machines have the ability to think? Lex reminds us, Chess has been one of the tests for high human intelligence. He reminds us of the chess game between Garry Kasparov, one of the greatest chess players to ever live, and IBM’s Deep Blue bot. Deep Blue has beaten Garry and yet we do not give enough credit to the machine. So what do you mean by a “thinking machine”? What should a machine be capable of doing to be identified as a “thinking machine”?</p><p>There is something called a Loebner Prize. The bots which participate in this competition, receive prizes for fooling judges on Turing Test. Unfortunately, as I said, the funding has stopped. This leads us to the next open question.</p><p><strong>Open Question 2: Why is this test not more popular? Why did people stop funding for Loebner prize which aims to test a machine’s intelligence through the Turing Test? Did people stop considering it as an actual test to measure intelligence?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*uXMr77jYJSpZNeu9cjdXCQ.png" /></figure><p>Check if you can tell if the <strong>Mitsuku ChatBot, </strong>which participates in Loebner Prize,<strong> </strong>is talking like a human or a robot. When did it start talking like a robot? What made it give away? Can you explicitly pinpoint a line or the tone or the thought which is running in your mind while reading this chat to say “it failed here”?</p><p><strong>Open Question 3: Which part of this conversation gives the bot away? Not much research has been done on this.</strong></p><p><strong>Eugene Goostman</strong>, another bot, passed on the 60th anniversary of Turing Death. It fooled 33% of the judges. Different techniques were used. Read the conversation in the below picture and compare it with <strong>Mitsuku</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*k671_228GKjvmcqgSiKGcQ.png" /></figure><p><strong>Google’s Meena, an end to end deep-learning system </strong>claims that it is second to humans in talking like humans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*84XKpEiK61S5mZ9SIQQ7Aw.png" /></figure><p>They proposed<strong> a new metric called SSA: Sensibleness and Specificity Average.</strong> Humans scored 86% against this SSA Metric, whereas Meena claims to score 79%. According to Lex, this might be a PR gimmick.</p><p>Another take away is that if you want to make a good chatbot, you need to meet these metrics. Also, how does one calculate SSA for bots as well as humans? I believe more research needs to be done on this metric to uncover the secrets.</p><p>Great news for people who are researching in Natural Language Processing and working with ChatBots.</p><p>On 29th April 2020, Facebook AI has open-sourced Blender, the largest-ever open-domain chatbot. It outperforms others in terms of engagement and also feels more human, according to human evaluators. They have studied recipes for large-scale open-domain chatbots, and are releasing 90M, 2.7B and 9.4B parameter models with SOTA results.</p><p>To evaluate their model, they benchmarked its performance against Google’s latest Meena chatbot through pairwise human evaluations.</p><p>When presented with chats showing Meena in action and chats showing Blender in action, 67 percent of the human evaluators said that their model (Blender) sounds more human, and 75 percent said that they would rather have a long conversation with Blender than with Meena. Check out the below conversation between Blender and a Human.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q5gn0p49w9Rps-NxpUG6HA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*anfox1qYH71lMt7vSGJCbA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkPN2wKrY10nvNN6qqnu5w.jpeg" /></figure><p>I appreciate them making this open-source as true progress in the AI field depends on reproducibility, the opportunity to build upon the best technology possible. They also believe that releasing models is essential to enable full, reliable insights into their capabilities.</p><p>Follow the below links to read about this further:</p><p><a href="https://arxiv.org/abs/2004.13637">Paper</a>, <a href="https://parl.ai/projects/blender/">Project/Code</a>, <a href="https://ai.facebook.com/blog/state-of-the-art-open-source-chatbot">Blog</a>.</p><p>Continuing about the discussion, when you say, yes machines can think, others might raise objections. So, Turing has come up with 9 Objections and has answered them. Lex, informally, summarizes them in his talk. Below is the summary:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*8kCIK8bTF0b5H5TjtCE4Yg.png" /></figure><p><strong>Open Questions 4: Does mimicking thinking equal thinking? Does mimicking consciousness equal consciousness? Does mimicking love equal love?</strong></p><p>This reminds me of the movie directed by Steven Spielberg, <strong>A.I</strong>. A wonderful movie where a little boy is attached to his mother. The boy turns out to be a robot. One must watch to find out, what happens to an artificial intelligence if it is provided state-of-the-art Emotional Intelligence as well?</p><p>The next few minutes in the discussion were about different tests other than Turing Test to prove a machine’s intelligence. Very complex, innovative, and interesting. If you’re interested, please follow this <a href="https://www.dropbox.com/s/62j4wdzduixpgz3/turing_test_share.pptx?dl=0#">link</a>.</p><h4><strong>Conclusion</strong></h4><p>Lex concludes the discussion by asking, whether the Turing Test is a good to test measure intelligence and to answer “can machines think?”</p><p>We must realize that, humans are also not always “intelligent”. The Turing Test relies on:</p><ol><li>Conversational skills of the human evaluator</li><li>Human-identification abilities of the human evaluator</li></ol><p>So, should we really consider passing the <strong>Turing Test</strong> as the ultimate test for machines to be considered on par with humans?</p><p>Another question to be considered is, we assert a great value on the SSA metric to measure if a chatbot is good or not. But, what if, a bot simply isn’t in the mood for a chat? What if it decides to be boring, like humans? What if it simply refuses to talk just because it can? Does that mean it failed the Turing Test?</p><p>I believe this article served its purpose in breaking down some of the complex questions into their basic form. I hope it left you with more questions to search for answers, because, Lex’s talk on this paper, certainly left me in awe and how we forget to ask the simplest of questions and yet not find answers to them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21990157ff70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make Dockerfile, build Docker Image, and run Docker Container — Part 2 of 2]]></title>
            <link>https://medium.com/fiolabs-datascience/how-to-make-dockerfile-build-docker-image-and-run-docker-container-part-2-of-2-82bfb30a6859?source=rss-12fd89def4b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/82bfb30a6859</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <dc:creator><![CDATA[Vidya]]></dc:creator>
            <pubDate>Fri, 01 May 2020 08:20:49 GMT</pubDate>
            <atom:updated>2020-05-01T08:22:08.390Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to make Dockerfile, build Docker Image, and run Docker Container — Part 2 of 2</h3><blockquote><em>This how-to article is about making a </em><strong><em>Dockerfile</em></strong><em>, building a </em><strong><em>Docker Image</em></strong><em>, and running a </em><strong><em>Docker Container</em></strong><em>.</em></blockquote><p>If you haven’t already installed <strong>Docker</strong> on your System, please follow Part — 1 of 2 of this Series to install. I’ve spent a good amount of time explaining why we need Docker, especially for a Data Science model. Click on the below link to revist:</p><p><a href="https://medium.com/fiolabs-datascience/how-to-install-docker-dc32596d7829">How to Install Docker?</a></p><p><strong>What I covered:</strong></p><ul><li><a href="#3c33"><strong>Pre-requisites</strong><br></a>a. <a href="#0473">Virtual Environment</a><br>b. <a href="#dc15">Python file (.py) &amp; API of a Data Science Model</a><br>c. <a href="#8468">requirements.txt</a></li><li><a href="#826a"><strong>Making a Dockerfile</strong></a></li><li><a href="#0ce9"><strong>Building Docker Image</strong></a></li><li><a href="#0802"><strong>Running Docker Container</strong></a></li><li><a href="#81f0"><strong>What are you waiting for?</strong></a></li><li><a href="#7c27"><strong>How to reach FIO Labs:</strong></a></li><li><a href="#3a67"><strong>References</strong></a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yKGxIarKT7_Ug6vbWz6f_Q.png" /></figure><p>As you can see from the above diagram when the <strong>Dockerfile</strong> is built, it becomes a <strong>Docker Image</strong> and when we run the Docker Image then it finally becomes a <strong>Docker Container</strong>. To understand these 3 terms, keep reading. From here on, we will be assuming you’ve already built your Data Science model or project.</p><h3>Pre-requisites</h3><p>For this demo, we need the following files ready:</p><ul><li>Virtual Environment for your project</li><li>Python file &amp; API of a Data Science Model</li><li>requirements.txt</li></ul><h4>Virtual Environment</h4><p>When you are creating a project, be sure to isolate the project’s dependencies by working on a Virtual Environment. You need pip installed for that. To create a Virtual Environment for your project, follow the 3 steps below:</p><ol><li>Go to your project folder</li></ol><p>cd myproject/</p><p>2. Install the package which helps you to create a virtual environment</p><p>pip install pipenv</p><p>3. Create a virtual environment.</p><p>pipenv shell</p><p>This will create a virtual environment especially for your Data Science Model/Web App.</p><h4>Python file (.py) &amp; API of a Data Science Model</h4><p>Since we’re not concentrating on how to create a Data Science model in this article, I’m not going to discuss much about the steps which are involved in it. It goes on to say that the dataset fed into the model contains employee profiles of a large company, where each record is an employee. The model predicts which employee has left and who stayed. The API for this model is built using FastAPI.</p><p>You can copy the model and API code from <a href="https://github.com/MaartenGr/ML-API">here</a>.</p><h4>requirements.txt</h4><p>Once you’re done building all the models for your project, go to the folder and use the following code, you can get the requirements.txt file:</p><pre>pip freeze &gt; requirements.txt</pre><h3>Making a Dockerfile</h3><p>“Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.”</p><p>On to the interesting part, let’s start coding!</p><p>Go to your project folder and create a Dockerfile:</p><pre>touch Dockerfile</pre><p>Now, in the Dockerfile, write the following code.</p><pre># Use the official image as a parent image.<br>FROM tiangolo/uvicorn-gunicorn:python3.6-alpine3.8</pre><p>A valid Dockerfile must always start with a FROM instruction. It initializes a new build stage and sets the <em>Base Image</em> for subsequent instructions. Here, we’re using the base image as an alpine image which is recommended as it is small in size. More about Docker base images can be read on the link below:</p><p><a href="https://medium.com/fiolabs-datascience/docker-images-5be800a7a81c">Docker Images</a></p><pre>LABEL MAINTAINER=&quot;Vidya P &lt;vidya@fiolabs.ai&gt;&quot;</pre><p>You can add labels to your image to help organize images by project, record licensing information, to aid in automation, or for other reasons. I am adding myself as MAINTAINER of this Dockerfile.</p><pre># Make directories suited to your application<br>RUN mkdir -p /home/project/app<br>WORKDIR /home/project/app</pre><p>The RUN instruction will execute any command in a new layer on top of the current image and commit the results. The resulting committed image will be used for the next step in the Dockerfile. In the above lines, we’re creating a directory for our application to run.</p><p>The WORKDIR instruction sets the working directory for the RUN instruction we provided. This is to make sure we’re running our application in the intended directory.</p><pre># Copy and install requirements<br>COPY requirements.txt /home/project/app<br>RUN pip install --no-cache-dir -r requirements.txt</pre><p>The COPY instruction copies new files or directories from the source, in our case, it is requirements.txt file and adds them to the filesystem of the container at the path /home/project/app. Once we copy the required files and directories, we would like to install all the packages which are mentioned in the requirements.txt file by using the RUN command.</p><pre># Copy contents from your local to your docker container<br>COPY . /home/project/app</pre><p>Save the Dockerfile.</p><p>Full code for Dockerfile.</p><pre># Use the official image as a parent image.<br>FROM tiangolo/uvicorn-gunicorn:python3.6-alpine3.8</pre><pre>LABEL MAINTAINER=&quot;Vidya P &lt;vidya@fiolabs.ai&gt;&quot;</pre><pre># Make directories suited to your application<br>RUN mkdir -p /home/project/app<br>WORKDIR /home/project/app</pre><pre># Copy and install requirements<br>COPY requirements.txt /home/project/app<br>RUN pip install --no-cache-dir -r requirements.txt</pre><pre># Copy contents from your local to your docker container<br>COPY . /home/project/app</pre><p>The above steps conclude us making a Dockerfile. Let’s build it.</p><h3>Building Docker Image</h3><p>Navigate to the folder where your Dockerfile is located. Follow the steps:</p><pre>docker build -t myimage ./</pre><p>The output should be something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*S-GiXRRZaEHJeUOITH1K-g.png" /></figure><h3>Running Docker Container</h3><p>Start a container based on your new image.</p><pre>docker run -d --name mycontainer -p 80:80 myimage</pre><p>- - name specifies a name with which you can refer to your container in subsequent commands, in this case mycontainer.</p><p>80:80 specifies that your container is running on port 80 and your host port is also 80. The syntax for -p is HOST_PORT:CLIENT_PORT.</p><p>Your API is now ready and can be accessed from <a href="http://127.0.0.1/docs">http://127.0.0.1/docs</a>.</p><p>Below are some screenshots to give you a glimpse of the cool UI which is accessible using FastAPI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VdI3OGhl-CBytnr3MkjQ7A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXyDD1dVS5h_Y5jJSVH3IQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7KpdRDGW-pca7OZplb-Tyg.png" /></figure><p>Congratulations! You’ve successfully learned how to make a Dockerfile, build a Docker Image, and run a Docker Container. Let us know this how-to article helped your Data Science project. If you have any questions please leave a comment below and we will try to provide a solution to your queries.</p><figure><img alt="FIO LABS" src="https://cdn-images-1.medium.com/max/800/1*5xfGD2seT7TZHG8MApFcCA.png" /><figcaption><a href="http://www.fiolabs.ai/">www.fiolabs.ai</a></figcaption></figure><h3>What are you waiting for?</h3><p>We believe FIO Labs never fails to keep their promise when it comes to providing quality services. Our enterprise expertise and industry leadership mean you’re in safe hands.</p><p>If you are interested in learning more about what we do at FIO Labs or have some questions about this page, feel free to send us a message to <a href="/service/mailto:contact@fiolabs.ai">contact@fiolabs.ai</a> — we’d love to hear from you.</p><h3>How to reach FIO Labs:</h3><p><strong><em>Leave a comment below | </em></strong><a href="https://calendly.com/saga9/30min?month=2020-04"><strong><em>Book a FREE 30-min session for our on-going Pro Bono Services</em></strong></a><strong><em> or </em></strong><a href="https://www.linkedin.com/posts/fiolabs_pro-bono-ai-support-services-activity-6651785903175983104-c0ww"><strong><em>Fill in our LinkedIn Form</em></strong></a><strong><em>| </em></strong><a href="https://www.fiolabs.ai/contact"><strong><em>Contact Us</em></strong></a><strong><em> | </em></strong><a href="https://www.fiolabs.ai/about"><strong><em>About FIO Labs</em></strong></a><strong><em> | </em></strong><a href="https://www.fiolabs.ai/blog/"><strong><em>Blog</em></strong></a></p><h3>References</h3><ol><li>Dockerfile reference. (2020, April 24). Retrieved from <a href="https://docs.docker.com/engine/reference/builder/">https://docs.docker.com/engine/reference/builder/</a></li><li>Grootendorst, M. (2019, August 30). How to Deploy a Machine Learning Model. Retrieved from <a href="https://towardsdatascience.com/how-to-deploy-a-machine-learning-model-dc51200fe8cf">https://towardsdatascience.com/how-to-deploy-a-machine-learning-model-dc51200fe8cf</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82bfb30a6859" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fiolabs-datascience/how-to-make-dockerfile-build-docker-image-and-run-docker-container-part-2-of-2-82bfb30a6859">How to make Dockerfile, build Docker Image, and run Docker Container — Part 2 of 2</a> was originally published in <a href="https://medium.com/fiolabs-datascience">fiolabs-datascience</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>