Spaces:
Runtime error
Runtime error
metadata
title: Transformer Model Structure Visualizer
emoji: 🧩
colorFrom: indigo
colorTo: green
sdk: docker
app_file: backend/app.py
pinned: false
license: mit
short_description: Visualize transformer architectures.
tags:
- transformers
- visualization
- attention
- model-architecture
- huggingface
- model-layers
- model-structure
- hidden-states
Run the app locally
This app is developed using React + Fastapi. You can run this app locally with the following steps.
Run Frontend
Install dependencies:
npm iRun the app:
npm run devOpen the browser and access the service from http://localhost:5173/
Run Backend
Activate the virtual environment
Make sure you have your Python virtual environment set up and activated.
Navigate to the backend directory
cd backendInstall dependencies
pip install -r requirements.txt(Optional) Install GPU-related packages
If you are running on a GPU-enabled device, you can install additional packages (support for more models):
python install_gpu_packages.pyStart the backend server
Run the FastAPI app with Uvicorn:
uvicorn app:app --reload --host 0.0.0.0 --port 8000