Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -47,11 +47,30 @@ examples = [
|
|
47 |
['input.jpg', 'Test'],
|
48 |
]
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
with gr.Column():
|
52 |
image_input = gr.Image(type="numpy", label="Upload Image")
|
53 |
process_button = gr.Button("Process Image")
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
demo.launch()
|
|
|
47 |
['input.jpg', 'Test'],
|
48 |
]
|
49 |
|
50 |
+
css = """
|
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.Column():
|
64 |
image_input = gr.Image(type="numpy", label="Upload Image")
|
65 |
process_button = gr.Button("Process Image")
|
66 |
+
status = gr.Markdown(value="")
|
67 |
+
|
68 |
+
def update_status(img):
|
69 |
+
status.update(value="Processing... Please wait.")
|
70 |
+
processed_img = inference(img)
|
71 |
+
status.update(value="Processing complete!")
|
72 |
+
return processed_img
|
73 |
+
|
74 |
+
process_button.click(update_status, inputs=image_input, outputs=image_input)
|
75 |
|
76 |
demo.launch()
|