From f5faa2ef095f035110f83e17da0b35d3a34d6b97 Mon Sep 17 00:00:00 2001 From: Navan Chauhan <navanchauhan@gmail.com> Date: Sat, 17 Feb 2024 19:52:53 -0700 Subject: bump --- docs/posts/2019-12-22-Fake-News-Detector.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 6979c19..17ecaa1 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -26,7 +26,7 @@ <script data-goatcounter="https://navanchauhan.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script> <script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script> - <link rel="manifest" href="manifest.json" /> + <link rel="manifest" href="/manifest.json" /> </head> <body> @@ -35,6 +35,7 @@ <a href="/">home</a> | <a href="/about/">about/links</a> | <a href="/posts/">posts</a> | +<a href="/3D-Designs/">3D designs</a> | <!--<a href="/publications/">publications</a> |--> <!--<a href="/repo/">iOS repo</a> |--> <a href="/feed.rss">RSS Feed</a> | -- cgit v1.2.3 From f6d2141a480dd6b5b8ee0e48d43bb64773232791 Mon Sep 17 00:00:00 2001 From: Navan Chauhan <navanchauhan@gmail.com> Date: Tue, 26 Mar 2024 23:38:14 -0600 Subject: add header ids --- docs/posts/2019-12-22-Fake-News-Detector.html | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 17ecaa1..a7216aa 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -6,13 +6,13 @@ <link rel="stylesheet" href="/assets/main.css" /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Building a Fake News Detector with Turicreate</title> + <title>id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate</title> <meta name="og:site_name" content="Navan Chauhan" /> <link rel="canonical" href="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> <meta name="twitter:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html /> <meta name="og:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> - <meta name="twitter:title" content="Building a Fake News Detector with Turicreate" /> - <meta name="og:title" content="Building a Fake News Detector with Turicreate" /> + <meta name="twitter:title" content="id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate" /> + <meta name="og:title" content="id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate" /> <meta name="description" content="In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app" /> <meta name="twitter:description" content="In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app" /> <meta name="og:description" content="In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app" /> @@ -44,20 +44,20 @@ <main> - <h1>Building a Fake News Detector with Turicreate</h1> + <h1 id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate</h1> <p><strong>In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app</strong></p> <p>Note: These commands are written as if you are running a jupyter notebook.</p> -<h2>Building the Machine Learning Model</h2> +<h2 id="building-the-machine-learning-model">Building the Machine Learning Model</h2> -<h3>Data Gathering</h3> +<h3 id="data-gathering">Data Gathering</h3> <p>To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and whether it is fake or real. Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own</p> -<h3>Dependencies</h3> +<h3 id="dependencies">Dependencies</h3> <p>I used a Google Colab instance for training my model. If you also plan on using Google Colab then I recommend choosing a GPU Instance (It is Free) This allows you to train the model on the GPU. Turicreate is built on top of Apache's MXNet Framework, for us to use GPU we need to install @@ -72,7 +72,7 @@ a CUDA compatible MXNet package.</p> <p>If you do not wish to train on GPU or are running it on your computer, you can ignore the last two lines</p> -<h3>Downloading the Dataset</h3> +<h3 id="downloading-the-dataset">Downloading the Dataset</h3> <div class="codehilite"> <pre><span></span><code><span class="nt">!wget</span><span class="na"> -q "https</span><span class="p">:</span><span class="nc">//github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip"</span> @@ -80,7 +80,7 @@ a CUDA compatible MXNet package.</p> </code></pre> </div> -<h3>Model Creation</h3> +<h3 id="model-creation">Model Creation</h3> <div class="codehilite"> <pre><span></span><code><span class="kn">import</span> <span class="nn">turicreate</span> <span class="k">as</span> <span class="nn">tc</span> @@ -100,14 +100,14 @@ a CUDA compatible MXNet package.</p> </code></pre> </div> -<h4>Splitting Dataset</h4> +<h4 id="splitting-dataset">Splitting Dataset</h4> <div class="codehilite"> <pre><span></span><code><span class="n">train</span><span class="p">,</span> <span class="n">test</span> <span class="o">=</span> <span class="n">dataSFrame</span><span class="o">.</span><span class="n">random_split</span><span class="p">(</span><span class="mf">.9</span><span class="p">)</span> </code></pre> </div> -<h4>Training</h4> +<h4 id="training">Training</h4> <div class="codehilite"> <pre><span></span><code><span class="n">model</span> <span class="o">=</span> <span class="n">tc</span><span class="o">.</span><span class="n">text_classifier</span><span class="o">.</span><span class="n">create</span><span class="p">(</span> @@ -132,7 +132,7 @@ a CUDA compatible MXNet package.</p> </code></pre> </div> -<h3>Testing the Model</h3> +<h3 id="testing-the-model">Testing the Model</h3> <div class="codehilite"> <pre><span></span><code><span class="n">est_predictions</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">test</span><span class="p">)</span> @@ -165,7 +165,7 @@ a CUDA compatible MXNet package.</p> </code></pre> </div> -<h3>Exporting the Model</h3> +<h3 id="exporting-the-model">Exporting the Model</h3> <div class="codehilite"> <pre><span></span><code><span class="n">model_name</span> <span class="o">=</span> <span class="s1">'FakeNews'</span> @@ -178,9 +178,9 @@ a CUDA compatible MXNet package.</p> <p><a rel="noopener" target="_blank" href="https://colab.research.google.com/drive/1onMXGkhA__X2aOFdsoVL-6HQBsWQhOP4">Link to Colab Notebook</a></p> -<h2>Building the App using SwiftUI</h2> +<h2 id="building-the-app-using-swiftui">Building the App using SwiftUI</h2> -<h3>Initial Setup</h3> +<h3 id="initial-setup">Initial Setup</h3> <p>First we create a single view app (make sure you check the use SwiftUI button)</p> -- cgit v1.2.3 From 9e620084e57378952c1a7f8e0a772ebebd18932b Mon Sep 17 00:00:00 2001 From: Navan Chauhan <navanchauhan@gmail.com> Date: Wed, 27 Mar 2024 20:35:09 -0600 Subject: quick fix --- docs/posts/2019-12-22-Fake-News-Detector.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index a7216aa..553831d 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -6,13 +6,13 @@ <link rel="stylesheet" href="/assets/main.css" /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate</title> + <title>Building a Fake News Detector with Turicreate</title> <meta name="og:site_name" content="Navan Chauhan" /> <link rel="canonical" href="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> <meta name="twitter:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html /> <meta name="og:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> - <meta name="twitter:title" content="id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate" /> - <meta name="og:title" content="id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate" /> + <meta name="twitter:title" content="Building a Fake News Detector with Turicreate" /> + <meta name="og:title" content="Building a Fake News Detector with Turicreate" /> <meta name="description" content="In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app" /> <meta name="twitter:description" content="In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app" /> <meta name="og:description" content="In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app" /> -- cgit v1.2.3 From 01ff93c9c16867216f2d249664803860e1d6d5eb Mon Sep 17 00:00:00 2001 From: Navan Chauhan <navanchauhan@gmail.com> Date: Wed, 27 Mar 2024 22:49:40 -0600 Subject: generate new theme --- docs/posts/2019-12-22-Fake-News-Detector.html | 55 ++++++++++++++++++--------- 1 file changed, 37 insertions(+), 18 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 553831d..8b784e5 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -2,14 +2,26 @@ <html lang="en"> <head> - <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> + + <title>Building a Fake News Detector with Turicreate</title> + + <!-- + <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" /> + --> + + <link rel="stylesheet" href="/assets/c-hyde.css" /> + + <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface"> + <link rel="stylesheet" href="/assets/main.css" /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Building a Fake News Detector with Turicreate</title> <meta name="og:site_name" content="Navan Chauhan" /> <link rel="canonical" href="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> - <meta name="twitter:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html /> + <meta name="twitter:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> <meta name="og:url" content="https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html" /> <meta name="twitter:title" content="Building a Fake News Detector with Turicreate" /> <meta name="og:title" content="Building a Fake News Detector with Turicreate" /> @@ -29,21 +41,27 @@ <link rel="manifest" href="/manifest.json" /> </head> -<body> - <center><nav style="display: block;"> -| -<a href="/">home</a> | -<a href="/about/">about/links</a> | -<a href="/posts/">posts</a> | -<a href="/3D-Designs/">3D designs</a> | -<!--<a href="/publications/">publications</a> |--> -<!--<a href="/repo/">iOS repo</a> |--> -<a href="/feed.rss">RSS Feed</a> | -</nav> -</center> +<body class="theme-base-0d"> + <div class="sidebar"> + <div class="container sidebar-sticky"> + <div class="sidebar-about"> + <h1><a href="/">Navan</a></h1> + <p class="lead">Something Funny</p> + </div> + + <ul class="sidebar-nav"> + <li><a class="sidebar-nav-item" href="/about/">about/links</a></li> + <li><a class="sidebar-nav-item" href="/posts/">posts</a></li> + <li><a class="sidebar-nav-item" href="/3D-Designs/">3D designs</a></li> + <li><a class="sidebar-nav-item" href="/feed.rss">RSS Feed</a></li> + <li><a class="sidebar-nav-item" href="/colophon/">colophon</a></li> + </ul> + <p>© 2024. All rights reserved. + </div> +</div> + <div class="content container"> -<main> - + <div class="post"> <h1 id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate</h1> <p><strong>In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app</strong></p> @@ -308,14 +326,15 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i </code></pre> </div> + </div> <blockquote>If you have scrolled this far, consider subscribing to my mailing list <a href="https://listmonk.navan.dev/subscription/form">here.</a> You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.</blockquote> <script data-isso="https://comments.navan.dev/" src="https://comments.navan.dev/js/embed.min.js"></script> <section id="isso-thread"> <noscript>Javascript needs to be activated to view comments.</noscript> </section> -</main> + </div> <script src="assets/manup.min.js"></script> <script src="/pwabuilder-sw-register.js"></script> </body> -- cgit v1.2.3 From de19543d7fb44d343b052dc9b34ede78620c4a46 Mon Sep 17 00:00:00 2001 From: Navan Chauhan <navanchauhan@gmail.com> Date: Wed, 27 Mar 2024 23:36:55 -0600 Subject: Generate --- docs/posts/2019-12-22-Fake-News-Detector.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 8b784e5..bb22f48 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -46,7 +46,7 @@ <div class="container sidebar-sticky"> <div class="sidebar-about"> <h1><a href="/">Navan</a></h1> - <p class="lead">Something Funny</p> + <p class="lead" id="random-lead">Alea iacta est.</p> </div> <ul class="sidebar-nav"> @@ -56,9 +56,21 @@ <li><a class="sidebar-nav-item" href="/feed.rss">RSS Feed</a></li> <li><a class="sidebar-nav-item" href="/colophon/">colophon</a></li> </ul> - <p>© 2024. All rights reserved. + <div class="copyright"><p>© 2019-2024. Navan Chauhan <br> <a href="/feed.rss">RSS</a></p></div> </div> </div> + +<script> +let phrases = [ + "Something Funny", "Veni, vidi, vici", "Alea iacta est", "In vino veritas", "Acta, non verba", "Castigat ridendo mores", + "Cui bono?", "Memento vivere", "अहम् ब्रह्मास्मि", "अनुगच्छतु प्रवाहं", "चरन्मार्गान्विजानाति", "coq de cheval", "我愛啤酒" + ]; + +let new_phrase = phrases[Math.floor(Math.random()*phrases.length)]; + +let lead = document.getElementById("random-lead"); +lead.innerText = new_phrase; +</script> <div class="content container"> <div class="post"> -- cgit v1.2.3 From a982ceab0b45609991179b3020a00260eed6f798 Mon Sep 17 00:00:00 2001 From: Navan Chauhan <navanchauhan@gmail.com> Date: Wed, 27 Mar 2024 23:45:59 -0600 Subject: css --- docs/posts/2019-12-22-Fake-News-Detector.html | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index bb22f48..3a7a843 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -5,6 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> + <meta name="theme-color" content="#6a9fb5"> <title>Building a Fake News Detector with Turicreate</title> -- cgit v1.2.3