Spaces:
Running
Running
adamtayzzz
commited on
Commit
•
f915ec0
1
Parent(s):
bea90b3
Update app.py
Browse files
app.py
CHANGED
@@ -3,20 +3,9 @@ import requests
|
|
3 |
import numpy as np
|
4 |
import torch
|
5 |
import torch.nn as nn
|
6 |
-
import torchvision.transforms as
|
7 |
-
# from badnet_m import BadNet
|
8 |
-
|
9 |
-
import timm
|
10 |
-
|
11 |
-
# model = timm.create_model("hf_hub:nateraw/resnet18-random", pretrained=True)
|
12 |
-
# model.train()
|
13 |
-
|
14 |
-
# model = BadNet(3, 10)
|
15 |
-
# pipeline = pipeline.to('cuda:0')
|
16 |
-
|
17 |
|
18 |
import os
|
19 |
-
|
20 |
import logging
|
21 |
|
22 |
from transformers import WEIGHTS_NAME,AdamW,AlbertConfig,AlbertTokenizer,BertConfig,BertTokenizer
|
@@ -28,9 +17,6 @@ from transformers import glue_processors as processors
|
|
28 |
import datasets
|
29 |
from whitebox_utils.classifier import MyClassifier
|
30 |
|
31 |
-
import ssl
|
32 |
-
ssl._create_default_https_context = ssl._create_unverified_context
|
33 |
-
|
34 |
import random
|
35 |
import numpy as np
|
36 |
import torch
|
|
|
3 |
import numpy as np
|
4 |
import torch
|
5 |
import torch.nn as nn
|
6 |
+
import torchvision.transforms as transform
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
import os
|
|
|
9 |
import logging
|
10 |
|
11 |
from transformers import WEIGHTS_NAME,AdamW,AlbertConfig,AlbertTokenizer,BertConfig,BertTokenizer
|
|
|
17 |
import datasets
|
18 |
from whitebox_utils.classifier import MyClassifier
|
19 |
|
|
|
|
|
|
|
20 |
import random
|
21 |
import numpy as np
|
22 |
import torch
|