ffcm commited on
Commit
9229393
1 Parent(s): d2b6714

uses torch load

Browse files
Files changed (5) hide show
  1. app.py +2 -2
  2. cnn_model.bin +0 -0
  3. cnn_model_9907.bin +0 -0
  4. cnn_model_9961_sm.bin +0 -0
  5. 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('cnn_model_9961_sm.bin', 'rb') as f:
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='Check this out <a href="google.com">Google</a>',
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)