{"id":103198,"date":"2026-03-07T17:02:46","date_gmt":"2026-03-07T11:32:46","guid":{"rendered":"https:\/\/www.guvi.in\/blog\/?p=103198"},"modified":"2026-04-02T10:40:39","modified_gmt":"2026-04-02T05:10:39","slug":"creating-a-sentiment-analysis-app","status":"publish","type":"post","link":"https:\/\/www.guvi.in\/blog\/creating-a-sentiment-analysis-app\/","title":{"rendered":"Creating a Sentiment Analysis App with Hugging Face and Streamlit"},"content":{"rendered":"\n<p>The sentiment analysis app is a tool that <strong>reads text and determines whether it is positive or negative<\/strong>. It is an effective way to recognize <strong>feelings in messages, reviews, or comments, <\/strong>and finding the means to do so is no longer complicated.<\/p>\n\n\n\n<p>Now we are going to use Hugging Face for smart text analysis with AI and Streamlit to write a simple interactive application. Step by step, you will know how to transform the code into a live <strong>Sentiment Analysis App<\/strong>, which can analyze any text in real-time.<\/p>\n\n\n\n<p><strong><em>Quick Answer:<\/em><\/strong><\/p>\n\n\n\n<p>Quick Answer: A <strong>Sentiment Analysis app<\/strong> detects if the text is <strong>positive<\/strong>, <strong>negative<\/strong>, or <strong>neutral<\/strong>. <strong>Streamlit<\/strong> helps build a simple, interactive app, while <strong>Hugging Face<\/strong> provides pre-trained <strong>AI models<\/strong> to analyze the text easily.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Understand Sentiment Analysis App with Streamlit and Hugging Face<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"636\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-1200x636.jpg\" alt=\"\" class=\"wp-image-105375\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-1200x636.jpg 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-300x159.jpg 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-768x407.jpg 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-1536x814.jpg 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-2048x1085.jpg 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Understand-Sentiment-Analysis-App-with-Streamlit-and-Hugging-Face-150x80.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Sentiment Analysis App: Definition<\/strong><\/h3>\n\n\n\n<p>A sentiment analysis app is an application that evaluates the sentiment (whether a sentence or review is positive or negative) by reading and analyzing text.<\/p>\n\n\n\n<p><strong>For example<\/strong>, when a person types something like <strong><em>&#8220;This product is amazing&#8221;<\/em><\/strong>, the application will indicate that as<strong> positive<\/strong> sentiment, and when the person types something like <strong><em>&#8220;I hate this&#8221;<\/em><\/strong>, the application will indicate that as <strong>negative <\/strong>sentiment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How Streamlit and Hugging Face Help Build a Sentiment Analysis App<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Streamlit<\/strong><\/h4>\n\n\n\n<p><a href=\"https:\/\/www.guvi.in\/blog\/what-is-streamlit-in-python\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Streamlit<\/strong><\/a> is a minimal framework that lets you create a web app with your Python code in a very short time. You never have to learn web design or web programming, such as HTML or CSS. You can make buttons, text boxes, and make results appear on a web page with just a few lines.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Hugging Face<\/strong><\/h4>\n\n\n\n<p><a href=\"https:\/\/www.guvi.in\/blog\/what-is-hugging-face\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Hugging Face<\/strong><\/a> is a platform that provides pretrained AI models, particularly for text interpretation. It assists you with sentiment analysis, translation, and text generation without requiring you to build everything from scratch. You just have to copy their models, and you can do it in a few steps.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Brief Overview: How to develop it?<\/strong><\/h4>\n\n\n\n<p>To create this app, you stage<strong> <a href=\"https:\/\/huggingface.co\/\" target=\"_blank\" rel=\"noopener\">Hugging Face<\/a><\/strong> to obtain a <strong>pre-trained sentiment analysis model<\/strong> that understands content, and then use <strong><a href=\"https:\/\/streamlit.io\/\" target=\"_blank\" rel=\"noopener\">Streamlit<\/a><\/strong> to <strong>create an interactive webpage<\/strong> where individuals can type a sentence.<\/p>\n\n\n\n<p>Once the user types the text, the application forwards it to the Hugging Face model and receives the answer (positive or negative), and displays it on the screen.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"background-color: #099f4e; border: 3px solid #110053; border-radius: 12px; padding: 18px 22px; color: #FFFFFF; font-size: 18px; font-family: Montserrat, Helvetica, sans-serif; line-height: 1.6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); max-width: 750px;\">\n  <strong style=\"font-size: 22px; color: #ffffff;\">\ud83d\udca1 Did You Know?<\/strong> <br \/><br \/>\n  <span>\n    The first <strong style=\"color: #110053;\">sentiment analysis<\/strong> system was created in <strong style=\"color: #110053;\">2000<\/strong> by <strong style=\"color: #110053;\">AT&#038;T Labs<\/strong>, paving the way for <strong style=\"color: #110053;\">AI tools<\/strong> like <strong style=\"color: #110053;\">Hugging Face<\/strong>.\n  <\/span>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prepare Your Setup for Developing the Sentiment Analysis Application<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"636\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-1200x636.jpg\" alt=\"\" class=\"wp-image-105376\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-1200x636.jpg 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-300x159.jpg 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-768x407.jpg 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-1536x814.jpg 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-2048x1085.jpg 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Prepare-Your-Setup-for-Developing-the-Application-150x80.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p>Follow these steps sequentially to set up your environment for developing the app:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Streamlit Installation<\/strong><\/h3>\n\n\n\n<p>To install Streamlit via the command line and run your first app, carefully follow the official guide here:<a href=\"https:\/\/docs.streamlit.io\/get-started\/installation\/command-line\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> <strong><em>Streamlit Installation<\/em><\/strong><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Connect the Hugging Face model to your Streamlit app<\/strong><\/h3>\n\n\n\n<p>In your terminal, make sure your virtual environment is activated \u2014 you should see something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(.venv) PS E:\\Python Project&gt;<\/code><\/pre>\n\n\n\n<p>This indicates that you are inside your project\u2019s<a href=\"https:\/\/www.guvi.in\/blog\/how-to-create-virtual-environment-in-python\/\" target=\"_blank\" rel=\"noreferrer noopener\"> <strong>virtual environment<\/strong><\/a>. Then, run the following command to install the Hugging Face Transformers library along with <strong>PyTorch<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install transformers torch<\/code><\/pre>\n\n\n\n<p>Wait until the installation completes fully before moving to the next step. This ensures your app can access the pre-trained sentiment analysis models.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Importing Lottie Animations (locally as JSON files)<\/strong><\/h3>\n\n\n\n<p>To show animated icons in your app, you can use <strong>Lottie animations<\/strong> saved as JSON files. First, install the required packages by running:<\/p>\n\n\n\n<p><strong>pip install streamlit-lottie requests<\/strong><\/p>\n\n\n\n<ul>\n<li><strong>streamlit-lottie<\/strong> lets you display Lottie animations in Streamlit.<\/li>\n\n\n\n<li>The<strong> requests<\/strong> library<strong> <\/strong>lets your app load JSON files from a URL when needed.<\/li>\n<\/ul>\n\n\n\n<p>Once installed, you can <strong>load local JSON files<\/strong> or web animations and display them in your app.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step-by-Step Guide to Building the App<\/strong><\/h2>\n\n\n\n<p>Follow these simple steps to build your Sentiment Analysis App quickly and easily:<\/p>\n\n\n\n<p><strong>Input: <\/strong>Refer to the screenshot below to see where users enter their text.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"636\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-1200x636.jpg\" alt=\"\" class=\"wp-image-105377\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-1200x636.jpg 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-300x159.jpg 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-768x407.jpg 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-1536x814.jpg 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-2048x1085.jpg 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-2-150x80.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p><strong>Output: <\/strong>Refer to the screenshot below to view the sentiment result and animation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"636\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-1200x636.jpg\" alt=\"\" class=\"wp-image-105378\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-1200x636.jpg 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-300x159.jpg 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-768x407.jpg 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-1536x814.jpg 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-2048x1085.jpg 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-3-150x80.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"636\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-1200x636.jpg\" alt=\"\" class=\"wp-image-105379\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-1200x636.jpg 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-300x159.jpg 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-768x407.jpg 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-1536x814.jpg 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-2048x1085.jpg 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/04\/Step-by-Step-Guide-to-Building-the-App-4-150x80.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p><strong>File Path: <\/strong>E:\\Python Project\\sentiment-analysis.py<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import streamlit as st\nfrom transformers import pipeline\nfrom streamlit_lottie import st_lottie\nimport requests\nimport json  \nst.set_page_config(page_title=\"Sentiment App\", page_icon=\"\ud83d\ude0a\")\n\nst.title(\"Sentiment Analysis App\")\n\n\n@st.cache_resource\ndef load_model():\n    return pipeline(\"sentiment-analysis\")\n\nclassifier = load_model()\n\ndef load_lottie_url(url):\n    r = requests.get(url)\n    if r.status_code != 200:\n        return None\n    return r.json()\n\n\ndef load_lottie_local(filepath):\n    with open(filepath, \"r\", encoding=\"utf-8\") as f:  \n        return json.load(f)\n\n\n\nhappy_anim = load_lottie_local(\"HappyBoy.json\")   \n\n\nsad_anim = load_lottie_local(\"MortyCryLoader.json\")      \n\nwith st.form(\"sentiment_form\"):\n    text = st.text_input(\"Enter text to analyze:\")\n    submit = st.form_submit_button(\"Analyze\")\n\nif submit:\n    if text:\n        result = classifier(text)\n        label = result&#91;0]&#91;'label']\n        score = result&#91;0]&#91;'score']\n\n        st.subheader(f\"Sentiment: {label}\")\n        st.write(\"Confidence:\", round(score * 100, 2), \"%\")\n\n        if label == \"POSITIVE\":\n            st_lottie(happy_anim, height=200, loop=False)\n        else:\n            st_lottie(sad_anim, height=200, loop=False)\n    else:\n        st.warning(\"Please enter some text!\")<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Import required libraries<\/strong><\/h3>\n\n\n\n<ul>\n<li>Import <strong>Streamlit<\/strong> for the app UI.<\/li>\n\n\n\n<li>Import <strong>the<\/strong> Transformers pipeline for sentiment analysis.<\/li>\n\n\n\n<li>Import <strong>st_lottie<\/strong> to show Lottie animations.<\/li>\n\n\n\n<li>Import <strong>requests<\/strong> and <strong>json<\/strong> to work with animation files.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import streamlit as st\nfrom transformers import pipeline\nfrom streamlit_lottie import st_lottie\nimport requests\nimport json\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Set up the app page<\/strong><\/h3>\n\n\n\n<ul>\n<li>Set the page title and icon using st.set_page_config.<\/li>\n\n\n\n<li>Add the main heading using st.title.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>st.set_page_config(page_title=\"Sentiment App\", page_icon=\"\ud83d\ude0a\")\nst.title(\"Sentiment Analysis App\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Load the sentiment model<\/strong><\/h3>\n\n\n\n<ul>\n<li>Use pipeline(&#8220;sentiment-analysis&#8221;) to load a pre-trained model.<\/li>\n\n\n\n<li>Cache it with @st.cache_resource to prevent reloading every time.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>@st.cache_resource\ndef load_model():\n    return pipeline(\"sentiment-analysis\")\nclassifier = load_model()\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Load Lottie animations<\/strong><\/h3>\n\n\n\n<ul>\n<li>Create functions to load animations from a <strong>URL<\/strong> or a <strong>local JSON file<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>def load_lottie_url(url):\n    r = requests.get(url)\n    if r.status_code != 200:\n        return None\n    return r.json()\ndef load_lottie_local(filepath):\n    with open(filepath, \"r\", encoding=\"utf-8\") as f:\n        return json.load(f)\n<\/code><\/pre>\n\n\n\n<ul>\n<li>Load two animations: one for happy, one for sad.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>happy_anim = load_lottie_local(\"HappyBoy.json\")\nsad_anim = load_lottie_local(\"MortyCryLoader.json\")\n<\/code><\/pre>\n\n\n\n<p>Note:<\/p>\n\n\n\n<p><strong>load_lottie_local<\/strong> loads a local JSON animation for Streamlit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Create input form<\/strong><\/h3>\n\n\n\n<ul>\n<li>Use st.form so users can type text and submit it.<\/li>\n\n\n\n<li>Add a text input and a submit button.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>with st.form(\"sentiment_form\"):\n    text = st.text_input(\"Enter text to analyze:\")\n    submit = st.form_submit_button(\"Analyze\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Analyze sentiment on submission<\/strong><\/h3>\n\n\n\n<ul>\n<li>Check if the user entered text.<\/li>\n\n\n\n<li>Use the classifier to get sentiment and confidence score.<\/li>\n\n\n\n<li>Show the sentiment, confidence, and the correct animation.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>if submit:\n    if text:\n        result = classifier(text)\n        label = result&#91;0]&#91;'label']\n        score = result&#91;0]&#91;'score']\n        st.subheader(f\"Sentiment: {label}\")\n        st.write(\"Confidence:\", round(score * 100, 2), \"%\")\n        if label == \"POSITIVE\":\n            st_lottie(happy_anim, height=200, loop=False)\n        else:\n            st_lottie(sad_anim, height=200, loop=False)\n    else:\n        st.warning(\"Please enter some text!\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 7: Run the app<\/strong><\/h3>\n\n\n\n<ul>\n<li>Open the project terminal and run:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>streamlit run app.py\n<\/code><\/pre>\n\n\n\n<ul>\n<li>Replace app.py with your file name (here, sentiment-analysis.py).<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>streamlit run sentiment-analysis.py<\/code><\/pre>\n\n\n\n<ul>\n<li>The app opens in your browser; type text, analyze it, and see animations.<\/li>\n<\/ul>\n\n\n\n<p>Step into the future with the <strong>HCL GUVI&#8217;s Intel &amp; IITM Pravartak Certified<\/strong><a href=\"https:\/\/www.guvi.in\/mlp\/artificial-intelligence-and-machine-learning?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=Creating+a+Sentiment+Analysis+App+with+Hugging+Face+and+Streamlit\" target=\"_blank\" rel=\"noreferrer noopener\"><strong> AI\/ML Course<\/strong><\/a>. <strong>Gain hands-on AI\/ML skills<\/strong> and open doors to high-paying tech careers starting today.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>We have configured a full Sentiment Analysis App in this blog guide using Streamlit, a Hugging Face model, and Lottie visual feedback animations, and have shown each step properly, from installation through to the results. With these steps, you will be able to build an interactive application that not only predicts sentiment but also enhances the user experience with animations, all running locally in a smooth virtual environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>FAQs<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1772815633754\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Can I use this app without an internet connection?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, but first-time downloads of models or animations require an internet connection. After that, it works fully offline.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1772815646731\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Why does the model only show POSITIVE or NEGATIVE sentiment?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The model is trained for binary sentiment, so it predicts only<strong> positive<\/strong> or <strong>negative<\/strong> results.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1772815665700\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Can I replace the Lottie animations with my own?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, save your JSON animation files locally and load them in the app using <strong>load_lottie_local()<\/strong>.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>The sentiment analysis app is a tool that reads text and determines whether it is positive or negative. It is an effective way to recognize feelings in messages, reviews, or comments, and finding the means to do so is no longer complicated. Now we are going to use Hugging Face for smart text analysis with [&hellip;]<\/p>\n","protected":false},"author":64,"featured_media":105373,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[933,715],"tags":[],"views":"982","authorinfo":{"name":"Abhishek Pati","url":"https:\/\/www.guvi.in\/blog\/author\/abhishek-pati\/"},"thumbnailURL":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/03\/Feature-image-1-300x116.jpg","jetpack_featured_media_url":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/03\/Feature-image-1-scaled.jpg","_links":{"self":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/103198"}],"collection":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/comments?post=103198"}],"version-history":[{"count":7,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/103198\/revisions"}],"predecessor-version":[{"id":105382,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/103198\/revisions\/105382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media\/105373"}],"wp:attachment":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media?parent=103198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/categories?post=103198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/tags?post=103198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}