Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -51,24 +51,27 @@ css = """
|
|
51 |
body {
|
52 |
background-color: rgb(17, 24, 39);
|
53 |
color: white;
|
54 |
-
overflow: hidden; /* Prevent scrolling */
|
55 |
}
|
56 |
.gradio-container {
|
57 |
background-color: rgb(17, 24, 39) !important;
|
58 |
border: none !important;
|
59 |
}
|
60 |
-
footer {display: none !important;}
|
61 |
"""
|
62 |
|
63 |
with gr.Blocks(css=css) as demo:
|
64 |
-
with gr.
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
67 |
|
68 |
def update_status(img):
|
69 |
processed_img = inference(img)
|
70 |
return processed_img
|
71 |
|
72 |
-
process_button.click(update_status, inputs=image_input, outputs=
|
73 |
|
74 |
demo.launch()
|
|
|
51 |
body {
|
52 |
background-color: rgb(17, 24, 39);
|
53 |
color: white;
|
|
|
54 |
}
|
55 |
.gradio-container {
|
56 |
background-color: rgb(17, 24, 39) !important;
|
57 |
border: none !important;
|
58 |
}
|
59 |
+
footer {display: none !important;}
|
60 |
"""
|
61 |
|
62 |
with gr.Blocks(css=css) as demo:
|
63 |
+
with gr.Row():
|
64 |
+
with gr.Column():
|
65 |
+
image_input = gr.Image(type="numpy", label="Upload Image")
|
66 |
+
process_button = gr.Button("Process Image")
|
67 |
+
with gr.Column():
|
68 |
+
for example in examples:
|
69 |
+
gr.Examples(examples=[example], inputs=image_input, examples_per_page=1)
|
70 |
|
71 |
def update_status(img):
|
72 |
processed_img = inference(img)
|
73 |
return processed_img
|
74 |
|
75 |
+
process_button.click(update_status, inputs=image_input, outputs=image_input)
|
76 |
|
77 |
demo.launch()
|