Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
import os
|
|
|
|
|
2 |
import tensorflow as tf
|
3 |
from matplotlib import pyplot as plt
|
4 |
import numpy as np
|
@@ -17,7 +19,7 @@ def recognize_digit(image):
|
|
17 |
|
18 |
iface = gr.Interface(
|
19 |
fn = recognize_digit,
|
20 |
-
inputs=gr.Image(shape=(28,28),image_mode = 'L',
|
21 |
outputs=gr.Label(top_num_classes=3),
|
22 |
description = 'Draw a Digit Below')
|
23 |
|
|
|
1 |
import os
|
2 |
+
os.system("pip uninstall -y gradio")
|
3 |
+
os.system("pip install gradio==3.50.2")
|
4 |
import tensorflow as tf
|
5 |
from matplotlib import pyplot as plt
|
6 |
import numpy as np
|
|
|
19 |
|
20 |
iface = gr.Interface(
|
21 |
fn = recognize_digit,
|
22 |
+
inputs=gr.Image(shape=(28,28),image_mode = 'L',invert_colors=True, source = 'canvas'),
|
23 |
outputs=gr.Label(top_num_classes=3),
|
24 |
description = 'Draw a Digit Below')
|
25 |
|