Skip to content

Amazon UNA (Universal eNquiry Analyzer) is a web application for intelligent product analysis on Amazon. It leverages advanced NLP and sentiment analysis techniques to answer natural language product queries, summarize customer reviews, and visualize review sentiment and word frequency.

Notifications You must be signed in to change notification settings

9keystrokes/AmazonUNA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon-UNA

Amazon UNA (Universal eNquiry Analyzer) is a web application for intelligent product analysis on Amazon. It leverages advanced NLP and sentiment analysis techniques to answer natural language product queries, summarize customer reviews, and visualize review sentiment and word frequency.

Features

  • Product Information Extraction: Retrieve detailed product info from Amazon using ASIN and RapidAPI.
  • Natural Language Question Answering: Answer user questions about a product using BERT and FLAN models.
  • Sentiment Analysis: Analyze and summarize customer sentiment from reviews.
  • Visualizations: Generate sentiment bar plots and word frequency heatmaps from review data.
  • Question-Answer History: Store and display previous user queries and responses.
  • Interactive Web Interface: Simple Flask-based UI for analysis and visualization.

Technologies Used

  • Backend: Python, Flask
  • NLP/ML: transformers (BERT, FLAN-T5), torch, pandas
  • Visualization: matplotlib, seaborn, wordcloud
  • Database: MongoDB (via pymongo)
  • Other: pyngrok (public tunnel), python-dotenv (env vars)
  • Frontend: HTML (Jinja templates), CSS

Directory Structure

├── app.py                # Main Flask app (routes, plotting, database integration)
├── model.py              # ProductAnalyzer class (API calls, NLP, Q&A, sentiment)
├── requirements.txt      # Python dependencies
├── templates/
│   ├── index.html        # Main web UI
│   └── history.html      # Query/response history page
├── static/
│   └── styles.css        # Custom styles
│   └── plots/            # Generated plots (created at runtime)

Setup & Installation

  1. Clone the Repository

    git clone https://github.com/9keystrokes/Amazon-UNA.git
    cd Amazon-UNA
  2. Install Requirements

    pip install -r requirements.txt
  3. Configure Environment Variables

    Create a .env file in the root directory with:

    NGROK_KEY=your_ngrok_key
    API_KEY=your_rapidapi_key
    MONGO_URI=your_mongodb_uri
    
  4. Run the Application

    python app.py

    The app will start locally and open a public URL via ngrok.

Usage

  • Enter a product ASIN and your question.
  • The app fetches product details & reviews, analyzes sentiment, answers your question, and visualizes results.
  • View your previous queries via the History page.

Notes

  • Requires valid RapidAPI and MongoDB credentials.
  • Supports up to 10 reviews per product for analysis.
  • All generated plots are saved to static/plots/.

About

Amazon UNA (Universal eNquiry Analyzer) is a web application for intelligent product analysis on Amazon. It leverages advanced NLP and sentiment analysis techniques to answer natural language product queries, summarize customer reviews, and visualize review sentiment and word frequency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published