Spaces:
Runtime error
Runtime error
updated app.py with all possible imports
Browse files
app.py
CHANGED
@@ -1,10 +1,32 @@
|
|
1 |
# gradioMisClassGradCAMimageInputter
|
|
|
|
|
2 |
import numpy as np
|
3 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
from PIL import Image
|
5 |
from pytorch_grad_cam import GradCAM
|
6 |
from pytorch_grad_cam.utils.image import show_cam_on_image
|
7 |
-
|
8 |
|
9 |
fileName = None
|
10 |
|
|
|
1 |
# gradioMisClassGradCAMimageInputter
|
2 |
+
import os
|
3 |
+
import math
|
4 |
import numpy as np
|
5 |
+
import pandas as pd
|
6 |
+
import seaborn as sn
|
7 |
+
import torch
|
8 |
+
import torch.nn as nn
|
9 |
+
import torch.nn.functional as F
|
10 |
+
import torchvision
|
11 |
+
import matplotlib.pyplot as plt
|
12 |
+
import torch.nn as nn
|
13 |
+
import torch.nn.functional as F
|
14 |
+
from IPython.core.display import display
|
15 |
+
from pl_bolts.datamodules import CIFAR10DataModule
|
16 |
+
from pl_bolts.transforms.dataset_normalizations import cifar10_normalization
|
17 |
+
from pytorch_lightning import LightningModule, Trainer, seed_everything
|
18 |
+
from pytorch_lightning.callbacks import LearningRateMonitor
|
19 |
+
from pytorch_lightning.callbacks.progress import TQDMProgressBar
|
20 |
+
from pytorch_lightning.loggers import CSVLogger
|
21 |
+
from torch.optim.lr_scheduler import OneCycleLR
|
22 |
+
from torch.optim.swa_utils import AveragedModel, update_bn
|
23 |
+
from torchmetrics.functional import accuracy
|
24 |
+
from pytorch_lightning.callbacks import ModelCheckpoint
|
25 |
+
from torchvision import datasets, transforms, utils
|
26 |
from PIL import Image
|
27 |
from pytorch_grad_cam import GradCAM
|
28 |
from pytorch_grad_cam.utils.image import show_cam_on_image
|
29 |
+
|
30 |
|
31 |
fileName = None
|
32 |
|