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()