Spaces:
Sleeping
Sleeping
File size: 485 Bytes
59135b8 c2eb29b 86e7584 c2eb29b 59135b8 86e7584 59135b8 c2eb29b 59135b8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import gradio as gr
from model import predict
description = (
"Upload a clear image of a pepper or potato leaf. "
"The model predicts if the leaf is healthy or shows signs of disease."
)
iface = gr.Interface(
fn=predict,
inputs=gr.Image(type="pil"),
outputs=gr.Label(num_top_classes=1),
title="Plant Disease Classifier",
description=description
)
iface.launch(share=True)
iface.launch(capture_session=True)
if __name__ == "__main__":
iface.launch()
|