DOI : 10.17577/IJERTCONV14IS010005- Open Access

- Authors : Pooja S P, Mr Gururaja S
- Paper ID : IJERTCONV14IS010005
- Volume & Issue : Volume 14, Issue 01, Techprints 9.0
- Published (First Online) : 01-03-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Empowering Artisans with Sentiment Intelligence: A FastAPI-Based ML System for Feedback Analysis
Pooja S P, Mr Gururaja S Department of Computer Applications
St Joseph Engineering College, Mangalore, Karnataka, India
Abstract – Artisans who create handmade products are increasingly using digital platforms to reach customers beyond their immediate regions. Despite this growing online presence, understanding the emotional tone and informal nature of customer feedback remains a significant hurdle. To overcome this, we built a customized sentiment analysis solution focused specifically on the needs of handmade product sellers. The system is powered by a Logistic Regression model trained on 21,000 authentic customer reviews, using bigram- enhanced TF-IDF vectorization to grasp contextual expressions more effectively. With a remarkable accuracy of 98%, the model is integrated into a FastAPI framework offering three core API endpoints. Additionally, a simplified visual dashboard displays feedback trends through intuitive pie and bar charts, allowing even non- technical artisans to understand and act on customer sentiments. This platform empowers small businesses to gain actionable insights from feedback and make well-informed decisions to improve their offerings.
Index Terms
Sentiment Analysis, Handmade Products, Logistic Regression, TF-IDF, FastAPI, Feedback Analysis, Natural Language Processing (NLP), User Reviews, Data Visualization.
-
INTRODUCTION
Handcrafted products often reflect rich cultural heritage, personal expression, and artistic dedication. Across India and globally, artisans spend years honing their skillsblending traditional methods with contemporary designs. With the rise of digital platforms and e- commerce, many of these talented creators now have the opportunity to showcase their work to an international audience. Despite this expanded reach, one major obstacle remains: effectively interpreting customer reviews.
These reviews can offer deep insights into product quality and customer satisfaction. However, as businesses scale, manually examining each piece of feedback becomes time-consuming and unsustainable. The challenge is compounded when the
sentiment is subtle or context- dependentfor example, phrases like not bad, which may indicate approval, or could be better, which suggests mild dissatisfaction, are often misread by simple keyword-based analysis tools.
To solve this problem, our project proposes a machine learningdriven sentiment analysis tool crafted specifically for the handmade product sector. The system is designed to interpret short and nuanced feedback more accurately. A FastAPI-based backend delivers real-time analysis, while the frontend, built with React.js, displays results through intuitive and visually clear components. By transforming unstructured customer input into meaningful insights, this tool supports artisans particularly those without technical expertisein understanding customer sentiment and making data- informed decisions to improve their offerings.
-
LITERATURE REVIEW
Over the past decade, sentiment analysis has evolved considerably, particularly in the context of interpreting customer feedback. What began as basic word-matching techniques has matured into sophisticated machine learning-driven approaches capable of capturing both emotion and context in textual data.
Early sentiment detection relied on lexicon-based tools such as TextBlob, which evaluate sentiment based on predefined word scores. While these methods are computationally efficient, they often struggle with contextual accuracy, frequently misreading phrases like not good or could be better as neutral rather than negative expressions [1].
To overcome these drawbacks, researchers shifted toward machine learning models, using techniques like TF-IDF and n-gram extraction. Studies evaluating unigram, bigram, and trigram configurationsparticularly on datasets like the Cornell Movie Reviewsshowed that bigram inclusion led to notable performance improvements when used with classifiers such as Logistic Regression and Support Vector Machines (SVM) [2], [3].
Another significant development involved integrating TF- IDF with statistical feature selection methods like chi- square and mutual information. When combined with ensemble learning models such as Random Forests or Logistic Regression, this strategy enhanced accuracy while keeping computational costs low [4].
In mobile product review analysis, a model employing bigram-based TF-IDF with Logistic Regression achieved approximately 85% accuracy, even surpassing more complex methods like Word2Vec or GloVe embeddings on select datasets [5].
A well-known study by Stanford researchers compared TF-IDF and Logistic Regression against deep learning models such as LSTM- based RNNs across platforms like Twitter, IMDB, and Yelp. Surprisingly, for longer and more detailed texts like IMDB reviews, TF-IDF paired with Logistic Regression outperformed other techniques underscoring its value in short-form sentiment classification [6].
Further analysis into phrase-level sentiment revealed that bigram-based TF-IDF could effectively capture expressions such as never again or not bad, allowing simpler models to rival the performance of more advanced architecturesparticularly in brief user reviews [7].
Another comparative study on Twitter data highlighted the strength of machine learning models using n-gram graphs (up to 4-grams), which achieved over 94% accuracyfar exceeding that of traditional lexicon-based methods [8].
Recent research has also explored real-time sentiment tracking. One such system introduced a live dashboard for monitoring customer sentiment, integrating real- time classification with visual analytics, which is vital for prompt decision-making in customer support
contexts [9].
Lastly, studies emphasize the importance of building intuitive and accessible sentiment tools for non- technical users. Solutions aimed at small businesses and artisan communities increasingly prioritize simple, visual dashboards that make complex analytics easy to interpret. This aligns with the goals of our proposed platform, which combines strong sentiment detection with a user- friendly interface tailored for broad usability [10].
-
METHODOLOGY
The design of our sentiment analysis system was guided by the need to maintain a balance between accuracy, performance scalability, and user accessibility. We implemented a traditional machine learning pipeline comprising several essential stages, including data preparation, feature extraction, model training, and final deployment through a web API.
-
Dataset Preparation
The dataset used in this work consisted of 21,000 customer reviews centered around handmade products. Each review was manually labeled as either positive, neutral, or negative. To enhance model learning and ensure consistent input quality, the dataset underwent several preprocessing steps:
-
Converted all text to lowercase for uniformity
-
Removed punctuation and special characters
-
Trimmed excessive white spaces
-
Standardized sentiment labels
-
Filtered out reviews that were too short or empty
These cleaning steps were critical in minimizing noise and ensuring the model trained on clear, structured data inputs.
-
-
Feature Extraction Using TF-IDF with Bigrams
To represent the textual datain a format suitable for machine learning, we utilized Term Frequency Inverse Document Frequency (TF- IDF) vectorization
enhanced with bigram support. This technique enabled the system to capture common two-word expressions such as not good or very bad, which carry more accurate sentiment cues than isolated words. In addition, frequently occurring stopwords were excluded to improve the quality and relevance of the extracted features.
python
vectorizer =
TfidfVectorizer(stop_words='english', ngram_range=(1, 2), max_features=5000)
-
Model Selection and Training
Logistic Regression was selected for its proven effectiveness and simplicity in handling text classification problems. To maintain the balance of sentiment categories, the dataset was divided using stratified sampling with an 80/20 train-test split. The model was configured with a maximum of 1000 iterations to ensure convergence during training.
python
model = LogisticRegression(max_iter=1000)
Upon evaluation, the model achieved a high accuracy rate of 98%, along with strong precision and recall metrics across all sentiment labels. It demonstrated robustness in interpreting short reviews and negation- based phrases, which are often problematic for simpler models.
-
Deployment Using FastAPI
Following training, both the model and the TF- IDF vectorizer were serialized using Joblib and integrated into a FastAPI application. FastAPI was chosen for its lightweight structure and fast performance, making it ideal for real-time
inference. The system provides three main API endpoints for prediction:
-
/predict: Generates sentiment classification using the trained machine learning model
-
/predict_textblob: Provides sentiment using a lexicon-based approach
-
/predict_smart: Automatically selects the most appropriate method based on review length
To facilitate seamless communication with the frontend dashboard, Cross-Origin Resource Sharing (CORS) was configured. This setup enables smooth interaction with a React.js-based interface that visually presents sentiment predictions in real time.
.RESULTS AND EVALUATION
-
-
Model Performance
The sentiment classification model, built using Logistic Regression, was trained on 80% of the available data and tested on the remaining 20%. This approach consistently delivered strong predictive performance across all sentiment categories. The model reached a high accuracy of 98%, with precision and recall scores varying between 95% and 99%, indicating reliable sentiment detection.
One of the model's standout features is its capability to handle negations accuratelyan area where many basic sentiment systems fall short. Phrases like "not worth buying" or "not great quality," which often confuse simpler analyzers, were properly identified as negative in sentiment. This demonstrates the value of using bigram- enhanced TF-IDF, which interprets the meaning of entire phrases rather than analyzing individual words in isolation.
As presented in Figure 1, the majority of reviews were categorized as positive, with a smaller proportion falling into neutral and negative classes.
-
Usability for Non-Technical Users
This system was intentionally designed to be user- friendly and accessible for individuals with little or no technical expertise. By integrating a powerful backend with an intuitive and visually guided frontend, the platform enables artisans and small-scale sellers to easily understand customer feedback.
There is no need for users to work with raw data files or technical reports. Instead, reviews can be directly entered into the application, which then instantly returns a sentiment labelpositive, neutral, or negative. This allows business owners to track customer satisfaction, recognize patterns, and take timely actions when necessary.
Figure 2 showcases how the dashboard clearly displays sentiment results using graphical representations like bar and pie charts. This visual approach helps users quickly gauge public perception of their products or services.
VI. FUTURE WORK
While the current sentiment analysis system performs with high accuracy and provides meaningful insights for sellers of handmade products, there is still room to expand its functionality and accessibility through future improvements.
A key enhancement would be enabling support for regional languages. Since many artisans receive feedback in their native tonguessuch as Kannada, Tamil, or Hindiadding multilingual capabilities would greatly broaden the tools accessibility. This could be achieved by incorporating translation models or NLP tools that handle multiple languages, particularly those based on
transformer architectures. Doing so would make the platform more inclusive and better suited for diverse linguistic communities.
Another valuable addition would be integrating explainability features. Currently, the model outputs a final sentiment label without revealing what influenced that outcome. By introducing tools like SHAP (SHapley Additive exPlanations) or attention visualization methods, users would gain insight into the exact words or phrases that drove the sentiment classification. This transparency would help build confidence in the system and allow users to derive more targeted insights from feedback.
Expanding the platform into a mobile application would also be highly beneficial. Many artisans in rural or semi- urban regions may not have consistent access to desktop systems. A lightweight, mobile-friendly version of the platform would make it easier for them to check customer feedback and manage their businesses directly from a smartphone.
Further, incorporating automatic reply suggestions based on review sentiment could improve user engagement. For instance, positive reviews might trigger a thank-you message, while negative feedback could prompt an apology or a support offer. This feature would be especially useful for artisans unfamiliar with digital customer service, helping them communicate more professionally.
Lastly, while the current model based on TF-IDF and Logistic Regression yields strong results, future work can explore the use of advanced deep learning models like BERT, RoBERTa, or XLNet. These transformer- based models offer deeper contextual understanding and could significantly improve classification accuracy for complex, mixed-tone, or nuanced reviews.
IV. CONCLUSION
This study presents a user-friendly sentiment analysis solution specifically crafted for sellers of handmade goods who may not have technical expertise. The system is capable of transforming unstructured feedback into meaningful, real-time insights that support business decision-making. By combining TF- IDF vectorization with bigram features and a Logistic Regression model, it captures subtle sentiment patterns that simpler models often overlook.
The backend, powered by FastAPI, offers flexible and scalable integration with online platforms, while the React.js-based frontend ensures a clean and intuitive user experience. This dual-structure design makes the system approachable for small- scale artisans, allowing them to interpret customer opinions without needing to understand the underlying technical processes.
Ultimately, the platform bridges the gap between complex machine learning technologies and the everyday needs of small business owners. It empowers artisans to act on genuine customer feedback rather than assumptions, enhancing their ability to improve products, strengthen customer relationships, and thrive in the digital marketplace.
VI. REFERENCES
-
Scikit-learn Developers, Scikit-learn: Machine Learning in Python, 2023. [Online].
-
Available: https://scikit-learn.org/stable/
-
TextBlob Library, Simple Text Processing, 2023. [Online].
Available: https://textblob.readthedocs.io/en/dev/
-
Khan & Roy, TF-IDF and Cosine Similarity in Product Feedback, International Journal of Application or Innovation in Engineering &
Management (IJAIEM), 2022. [Online]. Available: https://www.ijaiem.org/Volume11Issue3/IJAIE M-2022-03-02.pdf
-
https://www.sciencedirect.com/science/article/pii
/S1877050921000062
-
Seyeditabari, S. et al., Sentiment Analysis Using Graph-Based N- Grams, IEEE ICSC, 2014. [Online]. Available: https://ieeexplore.ieee.org/document/6880605
-
Zhao, W. et al., Live Dashboard for Real- Time Sentiment Monitoring, ACM Web Search and Data Mining, 2019. [Online]. Available: https://dl.acm.org/doi/10.1145/3290607.3299040
-
UNESCO, Digital Tools for Artisan Empowerment, 2022.
[Online]. Available: https://unesdoc.unesco.org/ark:/48223/pf000037 7223 -
Brown et al., Logistic Regression for Sentiment Classification, Proceedings of the ACM Conference on Information and Knowledge Management, 2023. [Online]. Available: https://dl.acm.org/doi/10.1145/3459637.3482395
-
Srivastava, S. and Singh, S., Sentiment Analysis of Mobile Product Reviews using TF- IDF and Logistic Regression, IEEE International Conference on Computing Methodologies and Communication, 2019. [Online]. Available:
https://ieeexplore.ieee.org/document/8687565
-
Socher, R. et al., Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank, Stanford University NLP Group, 2013. [Online]. Available: https://nlp.stanford.edu/~socherr/EMNLP2013_ RNTN.pdf
-
Jain, P., & Vishwakarma, D. K., A Bigram- Based Phrase-Level Sentiment Analysis Technique, Procedia Computer Science, vol. 167, pp. 17341742, 2021. [Online]. Available:
