Skip to content

jamal474/emotiontest

Repository files navigation

Emotion Detection from Text (Pyodide & React)

Version

This project demonstrates how to deploy a pre-trained machine learning model (Scikit-learn's LinearSVC with TfidfVectorizer) entirely within a web browser using Pyodide and worker api. The application uses a React frontend managed by the Vite build tool.

The ML model is loaded asynchronously from static files, eliminating the need for a backend server for running predictions. The estimated testing accuracy of the underlying model is 61%.

Technologies Used

This project uses a modern polyglot stack by integrating front-end frameworks with scientific Python libraries:

Category Technology Version(s) Role in Project
Frontend React ^18.2.0 JavaScript library for building the UI and the input/output components (Body.jsx).
Build Tooling Vite ^7.1.9 Used for development server (npm start) and optimized production builds.

Installation and Setup Guide

Prerequisites

Setup

  1. Install JavaScript dependencies:

    npm install
  2. Start the development server:

    npm start  # Runs the 'vite' command

    The application will launch, but the ML prediction button will not work until the model files are placed in the public folder.

About

Emotion Detection from Text | Pre-trained Models running in browser | React.js & Pyodide

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published