Kyle Dampier commited on
Commit
a11556c
1 Parent(s): f213495

tried changing tensorflow device to cpu

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,6 +14,7 @@ st.write('To view how this model was trained go to the `Files and Versions` tab
14
 
15
  # Import Pre-trained Model
16
  model = tf.keras.models.load_model('mnist.h5')
 
17
  plt.rcParams.update({'font.size': 18})
18
 
19
  # Create a sidebar to hold the settings
@@ -62,6 +63,6 @@ if canvas_result.image_data is not None:
62
 
63
  # Show resized image
64
  with st.expander('Show Resized Image'):
65
- st.write("The image needs to be resized, because it can only input 28x28 images")
 
66
  st.image(im, caption='Resized Image', width=28*9)
67
-
 
14
 
15
  # Import Pre-trained Model
16
  model = tf.keras.models.load_model('mnist.h5')
17
+ tf.device('/cpu:0')
18
  plt.rcParams.update({'font.size': 18})
19
 
20
  # Create a sidebar to hold the settings
 
63
 
64
  # Show resized image
65
  with st.expander('Show Resized Image'):
66
+ st.write(
67
+ "The image needs to be resized, because it can only input 28x28 images")
68
  st.image(im, caption='Resized Image', width=28*9)