dinakar commited on
Commit
dac1a60
1 Parent(s): ed94f69

update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -16,17 +16,17 @@ from keras.layers import Dense, Conv2D
16
  from keras.datasets import mnist
17
 
18
  # Gradio to build web app for presenting the ML model
19
- !pip install gradio
20
  import gradio as gr
21
 
22
  """# Loading pre-processed MNIST dataset"""
23
 
24
  # mnist.load_data() returns list of tuples
25
  (x_train, y_train), (x_test, y_test) = mnist.load_data()
26
- print(f"X_train Shape: {x_train.shape} | Type - {type(x_train)}")
27
- print(f"y_train Shape: {y_train.shape} | Type - {type(y_train)}")
28
- print(f"X_test Shape: {x_test.shape} | Type - {type(x_test)}")
29
- print(f"y_test Shape: {y_test.shape} | Type - {type(y_test)}")
 
30
 
31
  """-> Make modifications to the train and test datasets to suit the **ML model**
32
 
@@ -61,9 +61,9 @@ model.fit(x_train, y_train, epochs=20, validation_split=0.3)
61
  """# Evaluation of the Model"""
62
 
63
  results = model.evaluate(x_test, y_test)
64
- print(f"Accuracy: {100*(results[1])}")
65
 
66
- print(model.predict(x_test[0:1])) # returns list of lists
67
 
68
  """# Visualization using Gradio"""
69
 
 
16
  from keras.datasets import mnist
17
 
18
  # Gradio to build web app for presenting the ML model
 
19
  import gradio as gr
20
 
21
  """# Loading pre-processed MNIST dataset"""
22
 
23
  # mnist.load_data() returns list of tuples
24
  (x_train, y_train), (x_test, y_test) = mnist.load_data()
25
+
26
+ # print(f"X_train Shape: {x_train.shape} | Type - {type(x_train)}")
27
+ # print(f"y_train Shape: {y_train.shape} | Type - {type(y_train)}")
28
+ # print(f"X_test Shape: {x_test.shape} | Type - {type(x_test)}")
29
+ # print(f"y_test Shape: {y_test.shape} | Type - {type(y_test)}")
30
 
31
  """-> Make modifications to the train and test datasets to suit the **ML model**
32
 
 
61
  """# Evaluation of the Model"""
62
 
63
  results = model.evaluate(x_test, y_test)
64
+ # print(f"Accuracy: {100*(results[1])}")
65
 
66
+ # print(model.predict(x_test[0:1])) # returns list of lists
67
 
68
  """# Visualization using Gradio"""
69