Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import torch
|
2 |
import torch.nn as nn
|
3 |
import torchvision.transforms as transforms
|
@@ -46,7 +47,7 @@ def predict(image):
|
|
46 |
# Create the Gradio interface
|
47 |
iface = gr.Interface(
|
48 |
fn=predict,
|
49 |
-
inputs=gr.
|
50 |
outputs="label",
|
51 |
live=True
|
52 |
)
|
|
|
1 |
+
# app.py
|
2 |
import torch
|
3 |
import torch.nn as nn
|
4 |
import torchvision.transforms as transforms
|
|
|
47 |
# Create the Gradio interface
|
48 |
iface = gr.Interface(
|
49 |
fn=predict,
|
50 |
+
inputs=gr.Image(shape=(28, 28), image_mode='L', invert_colors=False),
|
51 |
outputs="label",
|
52 |
live=True
|
53 |
)
|