import gradio as gr from inference import predict iface = gr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="image", title="Solar Panel Fault Detection", description="Upload a thermal image of a solar panel to detect faults using YOLOv5/Roboflow model.") if __name__ == "__main__": iface.launch()