Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,33 +1,25 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
from infer import infer_image, infer_video
|
| 4 |
|
| 5 |
-
input_image = gr.Image(type='pil', label='Input Image')
|
| 6 |
-
input_model_image = gr.Radio([('x2', 2), ('x4', 4), ('x8', 8)], type="value", value=4, label="Model Upscale/Enhance Type")
|
| 7 |
-
submit_image_button = gr.Button('Submit')
|
| 8 |
-
output_image = gr.Image(type="filepath", label="Output Image")
|
| 9 |
-
|
| 10 |
tab_img = gr.Interface(
|
| 11 |
fn=infer_image,
|
| 12 |
-
inputs=[
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
)
|
| 17 |
|
| 18 |
-
input_video = gr.Video(label='Input Video')
|
| 19 |
-
input_model_video = gr.Radio([('x2', 2), ('x4', 4), ('x8', 8)], type="value", value=2, label="Model Upscale/Enhance Type")
|
| 20 |
-
submit_video_button = gr.Button('Submit')
|
| 21 |
-
output_video = gr.Video(label='Output Video')
|
| 22 |
-
|
| 23 |
tab_vid = gr.Interface(
|
| 24 |
fn=infer_video,
|
| 25 |
-
inputs=[
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
)
|
| 30 |
|
| 31 |
demo = gr.TabbedInterface([tab_img, tab_vid], ["Image", "Video"])
|
| 32 |
-
|
| 33 |
-
demo.launch(debug=True, show_error=True, share=True)
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from infer import infer_image, infer_video
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
tab_img = gr.Interface(
|
| 5 |
fn=infer_image,
|
| 6 |
+
inputs=[
|
| 7 |
+
gr.Image(type='pil', label='Input Image'),
|
| 8 |
+
gr.Radio([('x2', 2), ('x4', 4), ('x8', 8)], type="value", value=4, label="Scale")
|
| 9 |
+
],
|
| 10 |
+
outputs=gr.Image(type="pil", label="Output Image"),
|
| 11 |
+
title="Real-ESRGAN Upscaler"
|
| 12 |
)
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
tab_vid = gr.Interface(
|
| 15 |
fn=infer_video,
|
| 16 |
+
inputs=[
|
| 17 |
+
gr.Video(label='Input Video'),
|
| 18 |
+
gr.Radio([('x2', 2), ('x4', 4), ('x8', 8)], type="value", value=2, label="Scale")
|
| 19 |
+
],
|
| 20 |
+
outputs=gr.Video(label='Output Video'),
|
| 21 |
+
title="Real-ESRGAN Upscaler"
|
| 22 |
)
|
| 23 |
|
| 24 |
demo = gr.TabbedInterface([tab_img, tab_vid], ["Image", "Video"])
|
| 25 |
+
demo.launch()
|
|
|