Spaces:
Runtime error
Runtime error
uses torch load
Browse files- app.py +2 -2
- cnn_model.bin +0 -0
- cnn_model_9907.bin +0 -0
- cnn_model_9961_sm.bin +0 -0
- cnn_model_9973.bin +0 -0
app.py
CHANGED
@@ -5,7 +5,7 @@ import numpy as np
|
|
5 |
|
6 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
7 |
|
8 |
-
with open('
|
9 |
# nn = pickle.load(f)
|
10 |
nn = torch.load(f, map_location=torch.device('cpu'))
|
11 |
|
@@ -27,7 +27,7 @@ def predict(input):
|
|
27 |
demo = gr.Interface(
|
28 |
fn=predict,
|
29 |
title='ConvNet for handwritten digits classification',
|
30 |
-
description='
|
31 |
inputs=[
|
32 |
gr.Sketchpad(
|
33 |
shape=(28, 28),
|
|
|
5 |
|
6 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
7 |
|
8 |
+
with open('cnn_model.bin', 'rb') as f:
|
9 |
# nn = pickle.load(f)
|
10 |
nn = torch.load(f, map_location=torch.device('cpu'))
|
11 |
|
|
|
27 |
demo = gr.Interface(
|
28 |
fn=predict,
|
29 |
title='ConvNet for handwritten digits classification',
|
30 |
+
description='Created using Python and Numpy only.',
|
31 |
inputs=[
|
32 |
gr.Sketchpad(
|
33 |
shape=(28, 28),
|
cnn_model.bin
ADDED
Binary file (140 kB). View file
|
|
cnn_model_9907.bin
DELETED
Binary file (140 kB)
|
|
cnn_model_9961_sm.bin
DELETED
Binary file (140 kB)
|
|
cnn_model_9973.bin
DELETED
Binary file (140 kB)
|
|