Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

Β 

History

History
38 lines (26 loc) Β· 2.42 KB

File metadata and controls

38 lines (26 loc) Β· 2.42 KB

πŸ“š Pure PyTorch Multi-Dataset Word Predictor

An independent, lightweight Deep Learning project featuring a 2-Layer LSTM network built entirely in PyTorch (completely free of TensorFlow dependencies). The model is uniquely trained on a blended stream of contrasting text corporaβ€”classic Shakespearean theatrical drama and modern Elasticsearch technical documentationβ€”allowing it to predict the next sequential word across distinct writing styles.


πŸš€ Live Demo Showcase

Below is a demonstration of the interactive Gradio interface processing inputs, handling out-of-vocabulary terms gracefully, and executing next-word tensor inferences in real-time.

demo.mp4

πŸ’‘ Note: If you are editing this README on GitHub, drag and drop your renamed demo.mp4 video directly into the markdown editor to generate your unique cloud asset stream link, then paste it into the src="" attribute above.


🧠 Model Architecture & Features

Standard feed-forward neural networks fail to process contextual language because they lack sequential memory. This architecture overcomes that by leveraging recurrent state-tracking:

  • Pure Python Tokenization: Implements a custom text preprocessor to build vocabulary frequency indexes and handle left-aligned pre-padding sequences natively without framework overhead.
  • Embedding Layer: Transforms text tokens into dense continuous vectors ($128$-dimensional space) capturing semantic relationships.
  • Stacked LSTM Layers: Utilizes a deeper $2$-layer LSTM network with $256$ hidden dimensions to track complex long-range textual context across varied domains.
  • Regularization (Dropout): Integrates a dropout=0.3 rate between sequential layers to prevent overfitting on specific dataset biases.
  • Gradio Web Interface: Deploys a clean GUI complete with automated runtime example inputs for streamlined evaluation.

πŸ› οΈ Project Structure

word-predictor/
β”œβ”€β”€ assets/
β”‚   └── demo.mp4               # Professional demo video recording
β”œβ”€β”€ app.py                     # Main PyTorch & Gradio application script
β”œβ”€β”€ requirements.txt           # Environment dependencies list
└── README.md                  # Project documentation