Spaces:
Runtime error
Runtime error
sunshangquan
commited on
Commit
·
30e3fae
1
Parent(s):
c7e6ba9
commit from ssq
Browse files
app.py
CHANGED
@@ -28,12 +28,19 @@ def preprocess(file_, factor = 8):
|
|
28 |
def predict(input_img):
|
29 |
prediction = model_restoration(preprocess(input_img))
|
30 |
return input_img, prediction
|
31 |
-
|
|
|
|
|
32 |
gradio_app = gr.Interface(
|
33 |
predict,
|
34 |
-
inputs=gr.Image(label="Upload images with adverse weather degradations",
|
35 |
-
outputs=
|
|
|
|
|
|
|
36 |
title="Image Restoration for All-in-one Adverse Weather",
|
|
|
|
|
37 |
)
|
38 |
|
39 |
if __name__ == "__main__":
|
|
|
28 |
def predict(input_img):
|
29 |
prediction = model_restoration(preprocess(input_img))
|
30 |
return input_img, prediction
|
31 |
+
example_images = [
|
32 |
+
"examples/lemur.jpg",
|
33 |
+
]
|
34 |
gradio_app = gr.Interface(
|
35 |
predict,
|
36 |
+
inputs=gr.Image(label="Upload images with adverse weather degradations", type="filepath"),
|
37 |
+
outputs=[
|
38 |
+
gr.Image(type="filepath", label="Inverse Depth Map", height=768, width=768),
|
39 |
+
gr.Textbox(label="Focal Length or Error Message")
|
40 |
+
],
|
41 |
title="Image Restoration for All-in-one Adverse Weather",
|
42 |
+
description="[Histoformer](https://huggingface.co/sunsean/Histoformer/) is a image restoration model for all-in-one adverse weather.",
|
43 |
+
examples=example_images
|
44 |
)
|
45 |
|
46 |
if __name__ == "__main__":
|