Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ import itertools
|
|
| 10 |
import matplotlib.pyplot as plt
|
| 11 |
import utils as utils
|
| 12 |
from model import Net
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
model = Net()
|
|
@@ -124,7 +125,7 @@ def inference(wants_gradcam, n_gradcam, target_layer_number, transparency, wants
|
|
| 124 |
|
| 125 |
title = "CIFAR10 trained on Custom ResNet Model with GradCAM"
|
| 126 |
description = "A Gradio interface to infer on Custom ResNet model, and to get GradCAM results"
|
| 127 |
-
examples = [[
|
| 128 |
|
| 129 |
demo = gr.Interface(inference,
|
| 130 |
inputs = [gr.Checkbox(False, label='Do you want to see GradCAM outputs?'),
|
|
|
|
| 10 |
import matplotlib.pyplot as plt
|
| 11 |
import utils as utils
|
| 12 |
from model import Net
|
| 13 |
+
import os
|
| 14 |
|
| 15 |
|
| 16 |
model = Net()
|
|
|
|
| 125 |
|
| 126 |
title = "CIFAR10 trained on Custom ResNet Model with GradCAM"
|
| 127 |
description = "A Gradio interface to infer on Custom ResNet model, and to get GradCAM results"
|
| 128 |
+
examples = [[f'examples/{i}'] for i in os.listdir("examples")]
|
| 129 |
|
| 130 |
demo = gr.Interface(inference,
|
| 131 |
inputs = [gr.Checkbox(False, label='Do you want to see GradCAM outputs?'),
|