Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import PIL
|
|
5 |
import gradio as gr
|
6 |
import os
|
7 |
|
8 |
-
# Load model
|
9 |
checkpoint_path = "model_checkpoint.pth"
|
10 |
checkpoint_and_model = model_from_checkpoint(checkpoint_path)
|
11 |
model = checkpoint_and_model["model"]
|
@@ -31,7 +31,7 @@ def show_preds(input_image):
|
|
31 |
display_label=True,
|
32 |
display_bbox=True,
|
33 |
return_img=True,
|
34 |
-
font_size=
|
35 |
label_color="#FF59D6")
|
36 |
return pred_dict["img"]
|
37 |
|
@@ -39,8 +39,8 @@ gr_interface = gr.Interface(
|
|
39 |
fn=show_preds,
|
40 |
inputs=["image"],
|
41 |
outputs=[gr.outputs.Image(type="pil", label="VFNet Inference")],
|
42 |
-
title="
|
43 |
-
description="A VFNet model that detects common
|
44 |
examples=examples,
|
45 |
)
|
46 |
-
gr_interface.launch(inline=False, share=False, debug=True)
|
|
|
5 |
import gradio as gr
|
6 |
import os
|
7 |
|
8 |
+
# Load model
|
9 |
checkpoint_path = "model_checkpoint.pth"
|
10 |
checkpoint_and_model = model_from_checkpoint(checkpoint_path)
|
11 |
model = checkpoint_and_model["model"]
|
|
|
31 |
display_label=True,
|
32 |
display_bbox=True,
|
33 |
return_img=True,
|
34 |
+
font_size=16,
|
35 |
label_color="#FF59D6")
|
36 |
return pred_dict["img"]
|
37 |
|
|
|
39 |
fn=show_preds,
|
40 |
inputs=["image"],
|
41 |
outputs=[gr.outputs.Image(type="pil", label="VFNet Inference")],
|
42 |
+
title="Rice Disease Detector",
|
43 |
+
description="A VFNet model that detects common diseases on rice leaf. Upload an image or click an example image below to use.",
|
44 |
examples=examples,
|
45 |
)
|
46 |
+
gr_interface.launch(inline=False, share=False, debug=True)
|