Commit
·
867cf07
1
Parent(s):
2e0c6aa
Apply ruff
Browse files
app.py
CHANGED
@@ -6,21 +6,16 @@ import vec2text
|
|
6 |
import torch
|
7 |
from transformers import AutoModel, AutoTokenizer
|
8 |
from umap import UMAP
|
9 |
-
from tqdm import tqdm
|
10 |
import plotly.express as px
|
11 |
import numpy as np
|
12 |
from sklearn.decomposition import PCA
|
13 |
from streamlit_plotly_events import plotly_events
|
14 |
-
import plotly.graph_objects as go
|
15 |
-
import logging
|
16 |
import utils
|
17 |
|
18 |
use_cpu = not torch.cuda.is_available()
|
19 |
device = "cpu" if use_cpu else "cuda"
|
20 |
|
21 |
# Custom file cache decorator
|
22 |
-
import os
|
23 |
-
import pickle
|
24 |
|
25 |
def file_cache(file_path):
|
26 |
def decorator(func):
|
|
|
6 |
import torch
|
7 |
from transformers import AutoModel, AutoTokenizer
|
8 |
from umap import UMAP
|
|
|
9 |
import plotly.express as px
|
10 |
import numpy as np
|
11 |
from sklearn.decomposition import PCA
|
12 |
from streamlit_plotly_events import plotly_events
|
|
|
|
|
13 |
import utils
|
14 |
|
15 |
use_cpu = not torch.cuda.is_available()
|
16 |
device = "cpu" if use_cpu else "cuda"
|
17 |
|
18 |
# Custom file cache decorator
|
|
|
|
|
19 |
|
20 |
def file_cache(file_path):
|
21 |
def decorator(func):
|