Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,13 +2,14 @@ import os
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
def get_pipeline_prediction(pil_image):
|
| 5 |
-
|
| 6 |
pipeline_output = od_pipe(pil_image)
|
| 7 |
-
|
| 8 |
processed_image = render_results_in_image(pil_image,
|
| 9 |
pipeline_output)
|
| 10 |
return processed_image
|
| 11 |
|
|
|
|
| 12 |
demo = gr.Interface(
|
| 13 |
fn=get_pipeline_prediction,
|
| 14 |
inputs=gr.Image(label="Input image",
|
|
@@ -17,4 +18,4 @@ demo = gr.Interface(
|
|
| 17 |
type="pil")
|
| 18 |
)
|
| 19 |
|
| 20 |
-
demo.
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
def get_pipeline_prediction(pil_image):
|
| 5 |
+
# first get the pipeline output given the pil image
|
| 6 |
pipeline_output = od_pipe(pil_image)
|
| 7 |
+
# Then Process the image using the pipeline output
|
| 8 |
processed_image = render_results_in_image(pil_image,
|
| 9 |
pipeline_output)
|
| 10 |
return processed_image
|
| 11 |
|
| 12 |
+
|
| 13 |
demo = gr.Interface(
|
| 14 |
fn=get_pipeline_prediction,
|
| 15 |
inputs=gr.Image(label="Input image",
|
|
|
|
| 18 |
type="pil")
|
| 19 |
)
|
| 20 |
|
| 21 |
+
demo.launch
|