rmayormartins
commited on
Commit
•
48e2a1a
1
Parent(s):
97ccc10
atualiaza app
Browse files
app.py
CHANGED
@@ -36,6 +36,12 @@ def classify_images(uploaded_file, images):
|
|
36 |
|
37 |
return predictions
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
iface = gr.Interface(
|
40 |
fn=classify_images,
|
41 |
inputs=[
|
@@ -44,13 +50,9 @@ iface = gr.Interface(
|
|
44 |
],
|
45 |
outputs="text",
|
46 |
title="GTM-Keras-h5-Predictor",
|
47 |
-
description="In Google Teachable Machine, after training, under 'Export Model', go to 'Tensorflow', click on 'Keras' and then 'Download my model' (wait a moment). The zip will contain the Keras .h5 model."
|
|
|
48 |
)
|
49 |
|
50 |
-
iface.add_example(inputs=["converted_keras.zip", ["example1.jpg", "example2.jpg"]])
|
51 |
-
|
52 |
-
|
53 |
if __name__ == "__main__":
|
54 |
iface.launch(debug=True)
|
55 |
-
|
56 |
-
|
|
|
36 |
|
37 |
return predictions
|
38 |
|
39 |
+
#
|
40 |
+
exemplos = [
|
41 |
+
["converted_keras.zip", ["example1.jpg", "example2.jpg"]]
|
42 |
+
]
|
43 |
+
|
44 |
+
# Gradio
|
45 |
iface = gr.Interface(
|
46 |
fn=classify_images,
|
47 |
inputs=[
|
|
|
50 |
],
|
51 |
outputs="text",
|
52 |
title="GTM-Keras-h5-Predictor",
|
53 |
+
description="In Google Teachable Machine, after training, under 'Export Model', go to 'Tensorflow', click on 'Keras' and then 'Download my model' (wait a moment). The zip will contain the Keras .h5 model.",
|
54 |
+
examples=exemplos
|
55 |
)
|
56 |
|
|
|
|
|
|
|
57 |
if __name__ == "__main__":
|
58 |
iface.launch(debug=True)
|
|
|
|