Spaces:
Sleeping
Sleeping
File size: 580 Bytes
a4dd111 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from utils import predict_image
def build_ui():
with gr.Blocks() as demo:
gr.Markdown("# 🍃 Tea Leaf Disease Classifier")
gr.Markdown("Upload a tea leaf image and get the predicted disease class.")
with gr.Row():
image_input = gr.Image(type="pil", label="Upload Leaf Image")
output_text = gr.Textbox(label="Prediction Result")
gr.Button("Predict").click(
fn=predict_image,
inputs=image_input,
outputs=output_text
)
return demo
|