Spaces:
Sleeping
Sleeping
[Admin fix] Reposition `spaces` import for new ZeroGPU logic support
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import random
|
|
| 4 |
import time
|
| 5 |
import torch
|
| 6 |
import glob
|
|
|
|
| 7 |
|
| 8 |
import config
|
| 9 |
from model import get_model_and_tokenizer
|
|
@@ -20,7 +21,6 @@ device = "cuda"
|
|
| 20 |
|
| 21 |
k = config.k
|
| 22 |
|
| 23 |
-
import spaces
|
| 24 |
import matplotlib.pyplot as plt
|
| 25 |
|
| 26 |
import os
|
|
@@ -40,7 +40,6 @@ torch.backends.cudnn.allow_tf32 = True
|
|
| 40 |
|
| 41 |
prevs_df = pd.DataFrame(columns=['paths', 'embeddings', 'ips', 'user:rating', 'latest_user_to_rate', 'from_user_id', 'text', 'gemb'])
|
| 42 |
|
| 43 |
-
import spaces
|
| 44 |
start_time = time.time()
|
| 45 |
|
| 46 |
####################### Setup Model
|
|
|
|
| 4 |
import time
|
| 5 |
import torch
|
| 6 |
import glob
|
| 7 |
+
import spaces
|
| 8 |
|
| 9 |
import config
|
| 10 |
from model import get_model_and_tokenizer
|
|
|
|
| 21 |
|
| 22 |
k = config.k
|
| 23 |
|
|
|
|
| 24 |
import matplotlib.pyplot as plt
|
| 25 |
|
| 26 |
import os
|
|
|
|
| 40 |
|
| 41 |
prevs_df = pd.DataFrame(columns=['paths', 'embeddings', 'ips', 'user:rating', 'latest_user_to_rate', 'from_user_id', 'text', 'gemb'])
|
| 42 |
|
|
|
|
| 43 |
start_time = time.time()
|
| 44 |
|
| 45 |
####################### Setup Model
|