Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from PIL import Image
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
#
|
| 6 |
-
|
| 7 |
-
return result
|
| 8 |
|
| 9 |
-
iface = gr.Interface(
|
| 10 |
-
fn=detect_insect,
|
| 11 |
-
inputs=gr.Image(type="pil"),
|
| 12 |
-
outputs="text",
|
| 13 |
-
title="Insect Detector"
|
| 14 |
-
)
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
+
def predict(image):
|
| 4 |
+
# Replace with your model inference code
|
| 5 |
+
return "Insect detected: Example species"
|
|
|
|
| 6 |
|
| 7 |
+
iface = gr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="text")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
if __name__ == "__main__":
|
| 10 |
+
iface.launch()
|