Skip to content

saduri2004/transformer_from_scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transformer Model Interface

Screenshot 2024-10-04 at 3 03 18 PM

This repository contains the code for a web-based Transformer model interface, designed to visualize attention maps and test predictions using Flask and PyTorch.

Features

  • Interactive Web Interface: A Flask-based web interface for interacting with the Transformer model.
  • Attention Map Visualization: Visualize how the model focuses on different parts of the input.
  • Model Prediction: Test the model's predictions based on user input.

Installation

To set up the project environment, follow these steps:

  • Clone the repository:
    git clone https://github.com/yourusername/your-repository.git
    cd your-repository
    
    
  • Install the required packages:
    pip install torch torchvision torchaudio matplotlib flask datasets
    
  • Run the application with python3 main.py

The application will be available at http://127.0.0.1:5000/ on your local machine.

Usage

To use the application, navigate to http://127.0.0.1:5000/ in your web browser. You can start training the model, visualize the attention map, and enter text to see the model’s predictions.

About

Built a transformer using PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published