Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from roboflow_model import predict_image
|
| 3 |
+
|
| 4 |
+
def infer(image):
|
| 5 |
+
output = predict_image(image)
|
| 6 |
+
return output # Gradio automatically handles NumPy images
|
| 7 |
+
|
| 8 |
+
gr.Interface(
|
| 9 |
+
fn=infer,
|
| 10 |
+
inputs=gr.Image(type="filepath"),
|
| 11 |
+
outputs="image",
|
| 12 |
+
title="Roboflow Fault Detector",
|
| 13 |
+
description="Upload an image to detect faults using Roboflow workflow."
|
| 14 |
+
).launch()
|