Spaces:
Runtime error
Runtime error
Commit
·
0056c2d
1
Parent(s):
57dfa9f
flag update
Browse files
app.py
CHANGED
|
@@ -4,9 +4,10 @@ import numpy as np # linear algebra
|
|
| 4 |
import os #interacting with input and output directories
|
| 5 |
import tensorflow as tf #framework for creating the neural network
|
| 6 |
|
|
|
|
|
|
|
| 7 |
def fn(img):
|
| 8 |
img = np.expand_dims(img, axis = 0)
|
| 9 |
-
model = tf.keras.models.load_model(os.path.join(os.getcwd(), 'noteClassifierModel.h5'))
|
| 10 |
pred = model.predict(img)
|
| 11 |
pred = np.argmax(pred)
|
| 12 |
|
|
@@ -29,6 +30,7 @@ iface = gr.Interface(fn,
|
|
| 29 |
title="Note Classifier",
|
| 30 |
description=description,
|
| 31 |
theme="dark-seafoam",
|
| 32 |
-
allow_flagging="manual"
|
|
|
|
| 33 |
iface.launch(inline=False)
|
| 34 |
|
|
|
|
| 4 |
import os #interacting with input and output directories
|
| 5 |
import tensorflow as tf #framework for creating the neural network
|
| 6 |
|
| 7 |
+
model = tf.keras.models.load_model(os.path.join(os.getcwd(), 'noteClassifierModel.h5'))
|
| 8 |
+
|
| 9 |
def fn(img):
|
| 10 |
img = np.expand_dims(img, axis = 0)
|
|
|
|
| 11 |
pred = model.predict(img)
|
| 12 |
pred = np.argmax(pred)
|
| 13 |
|
|
|
|
| 30 |
title="Note Classifier",
|
| 31 |
description=description,
|
| 32 |
theme="dark-seafoam",
|
| 33 |
+
allow_flagging="manual",
|
| 34 |
+
flagging_dir='flagging records')
|
| 35 |
iface.launch(inline=False)
|
| 36 |
|