Spaces:
Runtime error
Runtime error
Commit
·
ace593e
1
Parent(s):
9c92c4a
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ from tensorflow.keras.models import load_model
|
|
16 |
|
17 |
input_1 = gr.Image(shape=(28,28),image_mode='L')
|
18 |
|
19 |
-
input_2 = gr.Dropdown(["SoftMax", "KNN", "Deep Neural Network", "
|
20 |
|
21 |
output = gr.Label(num_top_classes=6)
|
22 |
|
@@ -35,11 +35,6 @@ def predict_neural(test_img):
|
|
35 |
predictions = Neural_model.predict(test_img)
|
36 |
return {i: float(predictions[0][i]) for i in range(0,10)}
|
37 |
|
38 |
-
def predict_svm(test_img):
|
39 |
-
svm_model = pickle.load(open('svm_clf.pkl', 'rb'))
|
40 |
-
predictions = svm_model.predict_proba(test_img)
|
41 |
-
return {i: float(predictions[0][i]) for i in range(0,10)}
|
42 |
-
|
43 |
def predict_tree(test_img):
|
44 |
tree_model = pickle.load(open('tree_clf.pkl', 'rb'))
|
45 |
predictions = tree_model.predict_proba(test_img)
|
|
|
16 |
|
17 |
input_1 = gr.Image(shape=(28,28),image_mode='L')
|
18 |
|
19 |
+
input_2 = gr.Dropdown(["SoftMax", "KNN", "Deep Neural Network", "Decision Tree", "Random Forest"])
|
20 |
|
21 |
output = gr.Label(num_top_classes=6)
|
22 |
|
|
|
35 |
predictions = Neural_model.predict(test_img)
|
36 |
return {i: float(predictions[0][i]) for i in range(0,10)}
|
37 |
|
|
|
|
|
|
|
|
|
|
|
38 |
def predict_tree(test_img):
|
39 |
tree_model = pickle.load(open('tree_clf.pkl', 'rb'))
|
40 |
predictions = tree_model.predict_proba(test_img)
|