Spaces:
Runtime error
Runtime error
Gradio
Browse files- README.md +2 -1
- app.py +6 -1
- weight/epoch=2-step=294.ckpt +3 -0
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: gray
|
@@ -11,3 +11,4 @@ license: bsd
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
1 |
---
|
2 |
+
title: image-classification-with-explainability
|
3 |
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: gray
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
<!-- janakg/image-classification-with-explainability -->
|
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import torch
|
4 |
-
from torchvision import models, transforms
|
5 |
from PIL import Image
|
|
|
6 |
|
7 |
|
8 |
# Run Interface
|
@@ -23,6 +23,11 @@ def run_inference(input_image, gradcam=False, gradcam_layer=3, gradcam_num = 3,
|
|
23 |
"""
|
24 |
# # Load the CIFAR-10 model
|
25 |
|
|
|
|
|
|
|
|
|
|
|
26 |
# # Classify the image
|
27 |
# prediction = model.predict(image)
|
28 |
# predicted_class = np.argmax(prediction)
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import torch
|
|
|
4 |
from PIL import Image
|
5 |
+
from models.custom_resnet import CustomResNet
|
6 |
|
7 |
|
8 |
# Run Interface
|
|
|
23 |
"""
|
24 |
# # Load the CIFAR-10 model
|
25 |
|
26 |
+
# model = CustomResNet()
|
27 |
+
# checkpoint = torch.load('weight/epoch=2-step=294.ckpt')
|
28 |
+
# model.load_state_dict(checkpoint['model_state_dict'])
|
29 |
+
|
30 |
+
|
31 |
# # Classify the image
|
32 |
# prediction = model.predict(image)
|
33 |
# predicted_class = np.argmax(prediction)
|
weight/epoch=2-step=294.ckpt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0470be596783dca3901dff62bc15b636b32ee6e707b5ddfa95b8562d7ae5c78b
|
3 |
+
size 78937215
|