Spaces:
Running
Running
File size: 1,378 Bytes
9022542 3e11311 9022542 d8f6ef9 9022542 3e11311 9022542 3e11311 7742179 3e11311 9022542 3e11311 c3173d9 3e11311 c3173d9 3e11311 c3173d9 3e11311 c3173d9 3e11311 c3173d9 3e11311 c3173d9 3e11311 c3173d9 3e11311 5850346 3e11311 c3173d9 3e11311 5850346 119afbd 5850346 b014f93 3e11311 5850346 3e11311 5850346 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
---
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
1. Install dependencies:
```
npm i
```
2. Run the app:
```commandline
npm run dev
```
3. Open the browser and access the service from http://localhost:5173/
### Run Backend
1. **Activate the virtual environment**
Make sure you have your Python virtual environment set up and activated.
2. **Navigate to the backend directory**
```commandline
cd backend
```
3. **Install dependencies**
```commandline
pip install -r requirements.txt
```
4. **(Optional) Install GPU-related packages**
If you are running on a GPU-enabled device, you can install additional packages (support for more models):
```commandline
python install_gpu_packages.py
```
5. **Start the backend server**
Run the FastAPI app with Uvicorn:
```commandline
uvicorn app:app --reload --host 0.0.0.0 --port 8000
```
|