Spaces:
Sleeping
Sleeping
Commit
·
c46f212
1
Parent(s):
c0f0f0d
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import io
|
2 |
import torch
|
3 |
-
import pathlib
|
4 |
import numpy as np
|
5 |
import gradio as gr
|
6 |
import matplotlib.pyplot as plt
|
@@ -98,13 +97,10 @@ classes_to_show = gr.components.Textbox(
|
|
98 |
)
|
99 |
|
100 |
inputs = [image_in, prob_threshold_slider, classes_to_show]
|
101 |
-
img_input = gr.Image(type='pil')
|
102 |
-
example_images = gr.Dataset(components=[img_input], samples=[[path.as_posix()] for path in sorted(pathlib.Path('examples').rglob('*.*'))])
|
103 |
|
104 |
gr.Interface(fn=model_inference,
|
105 |
inputs=inputs,
|
106 |
outputs=image_out,
|
107 |
title=title,
|
108 |
description=description,
|
109 |
-
examples=example_images
|
110 |
).launch()
|
|
|
1 |
import io
|
2 |
import torch
|
|
|
3 |
import numpy as np
|
4 |
import gradio as gr
|
5 |
import matplotlib.pyplot as plt
|
|
|
97 |
)
|
98 |
|
99 |
inputs = [image_in, prob_threshold_slider, classes_to_show]
|
|
|
|
|
100 |
|
101 |
gr.Interface(fn=model_inference,
|
102 |
inputs=inputs,
|
103 |
outputs=image_out,
|
104 |
title=title,
|
105 |
description=description,
|
|
|
106 |
).launch()
|