Spaces:
Runtime error
Runtime error
Commit
·
27d3124
1
Parent(s):
f6d91ec
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ model.compile(optimizer=tf.keras.optimizers.Adam(),
|
|
23 |
loss=tf.keras.losses.CategoricalCrossentropy(),
|
24 |
metrics=[tf.keras.metrics.MeanSquaredError(), tf.keras.metrics.AUC(), tf.keras.metrics.CategoricalAccuracy()])
|
25 |
|
26 |
-
model = tf.keras.models.load_model('
|
27 |
|
28 |
|
29 |
def classify_image(image):
|
@@ -46,9 +46,6 @@ description = "Using the power of AI to detect the number you draw!"
|
|
46 |
article = "for source code you can visit [my github](https://github.com/mralamdari)"
|
47 |
|
48 |
example_list = [["examples/" + example] for example in os.listdir("examples")]
|
49 |
-
# interface = gr.Interface(fn=classify_image,
|
50 |
-
# inputs=gr.Sketchpad(),
|
51 |
-
# outputs='text')
|
52 |
|
53 |
interface = gr.Interface(fn=classify_image,
|
54 |
inputs=gr.Image(type="pil"),
|
|
|
23 |
loss=tf.keras.losses.CategoricalCrossentropy(),
|
24 |
metrics=[tf.keras.metrics.MeanSquaredError(), tf.keras.metrics.AUC(), tf.keras.metrics.CategoricalAccuracy()])
|
25 |
|
26 |
+
model = tf.keras.models.load_model('my_model.h5', compile=False)
|
27 |
|
28 |
|
29 |
def classify_image(image):
|
|
|
46 |
article = "for source code you can visit [my github](https://github.com/mralamdari)"
|
47 |
|
48 |
example_list = [["examples/" + example] for example in os.listdir("examples")]
|
|
|
|
|
|
|
49 |
|
50 |
interface = gr.Interface(fn=classify_image,
|
51 |
inputs=gr.Image(type="pil"),
|