Spaces:
Runtime error
Runtime error
some input output field bug fixed
Browse files
app.py
CHANGED
|
@@ -1,11 +1,3 @@
|
|
| 1 |
-
# import gradio as gr
|
| 2 |
-
|
| 3 |
-
# def greet(name):
|
| 4 |
-
# return "Hello " + name + "!!"
|
| 5 |
-
|
| 6 |
-
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
-
# demo.launch()
|
| 8 |
-
|
| 9 |
import gradio as gr
|
| 10 |
from ultralytics import YOLO
|
| 11 |
from PIL import Image
|
|
@@ -23,8 +15,8 @@ def image_display(input_image):
|
|
| 23 |
|
| 24 |
return im_array
|
| 25 |
|
| 26 |
-
input_component = gr.
|
| 27 |
-
output_component = gr.
|
| 28 |
|
| 29 |
# Create the Gradio interface
|
| 30 |
gr.Interface(
|
|
@@ -34,14 +26,4 @@ gr.Interface(
|
|
| 34 |
title="Image Display App",
|
| 35 |
description="Upload an image and see it displayed.",
|
| 36 |
theme="compact"
|
| 37 |
-
).launch(share=True)
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
# demo = gr.Interface(
|
| 42 |
-
# fn=greet,
|
| 43 |
-
# inputs='textbox',
|
| 44 |
-
# outputs='textbox',
|
| 45 |
-
# )
|
| 46 |
-
|
| 47 |
-
# demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from ultralytics import YOLO
|
| 3 |
from PIL import Image
|
|
|
|
| 15 |
|
| 16 |
return im_array
|
| 17 |
|
| 18 |
+
input_component = gr.Image()
|
| 19 |
+
output_component = gr.Image()
|
| 20 |
|
| 21 |
# Create the Gradio interface
|
| 22 |
gr.Interface(
|
|
|
|
| 26 |
title="Image Display App",
|
| 27 |
description="Upload an image and see it displayed.",
|
| 28 |
theme="compact"
|
| 29 |
+
).launch(share=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|