Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,24 +1,3 @@
|
|
| 1 |
-
# import gradio as gr
|
| 2 |
-
# import numpy as np
|
| 3 |
-
# from modelutil import create_model
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
# def predict_digit(image):
|
| 7 |
-
# try:
|
| 8 |
-
# if image == None: pass
|
| 9 |
-
# except:
|
| 10 |
-
# model = create_model()
|
| 11 |
-
# predictions = model.predict(image.reshape(1, 28, 28))
|
| 12 |
-
# return np.argmax(predictions)
|
| 13 |
-
|
| 14 |
-
# gr.Interface(
|
| 15 |
-
# title="MNIST Digit Classifier by Papa Sega",
|
| 16 |
-
# fn=predict_digit,
|
| 17 |
-
# inputs=gr.Sketchpad( label="Draw a digit"),
|
| 18 |
-
# outputs="number",
|
| 19 |
-
# live=True
|
| 20 |
-
# ).launch()
|
| 21 |
-
|
| 22 |
import tensorflow as tf
|
| 23 |
import gradio as gr
|
| 24 |
import numpy as np
|
|
@@ -41,10 +20,10 @@ def predict_digit(image):
|
|
| 41 |
|
| 42 |
# Define Gradio interface
|
| 43 |
gr.Interface(
|
| 44 |
-
title="
|
| 45 |
fn=predict_digit,
|
| 46 |
-
inputs=gr.Sketchpad(label="
|
| 47 |
-
outputs="
|
| 48 |
live=True
|
| 49 |
).launch(debug=True)
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import tensorflow as tf
|
| 2 |
import gradio as gr
|
| 3 |
import numpy as np
|
|
|
|
| 20 |
|
| 21 |
# Define Gradio interface
|
| 22 |
gr.Interface(
|
| 23 |
+
title="Reconnaissance d'écriture manuscrite des données MNIST by Papa Sega",
|
| 24 |
fn=predict_digit,
|
| 25 |
+
inputs=gr.Sketchpad(label="Desinner le chiffre ici", height=600, width=650),
|
| 26 |
+
outputs="Nombre",
|
| 27 |
live=True
|
| 28 |
).launch(debug=True)
|
| 29 |
|