Spaces:
Build error
Build error
Commit
·
8c6e8ab
1
Parent(s):
4c1f91e
update intro
Browse files
app.py
CHANGED
@@ -43,6 +43,7 @@ def preprocess_image(img_array):
|
|
43 |
# Main inference function
|
44 |
def inference(img_path):
|
45 |
img = Image.open(img_path)
|
|
|
46 |
img = preprocess_image(img)
|
47 |
img = np.expand_dims(img, 0)
|
48 |
preds = model.predict(img)
|
@@ -64,7 +65,7 @@ demo = gr.Interface(
|
|
64 |
article=article,
|
65 |
inputs=gr.inputs.Image(type="filepath", label="Input"),
|
66 |
outputs="label",
|
67 |
-
examples=examples
|
68 |
)
|
69 |
|
70 |
|
|
|
43 |
# Main inference function
|
44 |
def inference(img_path):
|
45 |
img = Image.open(img_path)
|
46 |
+
img = np.array(img)
|
47 |
img = preprocess_image(img)
|
48 |
img = np.expand_dims(img, 0)
|
49 |
preds = model.predict(img)
|
|
|
65 |
article=article,
|
66 |
inputs=gr.inputs.Image(type="filepath", label="Input"),
|
67 |
outputs="label",
|
68 |
+
examples=examples,
|
69 |
)
|
70 |
|
71 |
|