Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,20 +94,21 @@ body {
|
|
| 94 |
border: none !important;
|
| 95 |
}
|
| 96 |
#example_img .hide-container{
|
| 97 |
-
height:
|
| 98 |
width:50px;
|
| 99 |
transition: transform 0.5s ease;
|
| 100 |
}
|
| 101 |
#example_img{
|
| 102 |
-
width:
|
|
|
|
| 103 |
}
|
| 104 |
#example_img img{
|
| 105 |
-
height:
|
| 106 |
width:50px;
|
| 107 |
transition: transform 0.5s ease;
|
| 108 |
}
|
| 109 |
#example_img .container{
|
| 110 |
-
height:
|
| 111 |
width:50px;
|
| 112 |
transition: transform 0.5s ease;
|
| 113 |
}
|
|
@@ -115,12 +116,15 @@ footer {display: none !important;}
|
|
| 115 |
"""
|
| 116 |
|
| 117 |
with gr.Blocks(css=css) as demo:
|
| 118 |
-
|
|
|
|
|
|
|
| 119 |
with gr.Row():
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
|
|
|
| 124 |
|
| 125 |
def update_status(img):
|
| 126 |
processed_img = inference(img)
|
|
|
|
| 94 |
border: none !important;
|
| 95 |
}
|
| 96 |
#example_img .hide-container{
|
| 97 |
+
height:100%;
|
| 98 |
width:50px;
|
| 99 |
transition: transform 0.5s ease;
|
| 100 |
}
|
| 101 |
#example_img{
|
| 102 |
+
width:50px;
|
| 103 |
+
height:100%;
|
| 104 |
}
|
| 105 |
#example_img img{
|
| 106 |
+
height:50px;
|
| 107 |
width:50px;
|
| 108 |
transition: transform 0.5s ease;
|
| 109 |
}
|
| 110 |
#example_img .container{
|
| 111 |
+
height:50px;
|
| 112 |
width:50px;
|
| 113 |
transition: transform 0.5s ease;
|
| 114 |
}
|
|
|
|
| 116 |
"""
|
| 117 |
|
| 118 |
with gr.Blocks(css=css) as demo:
|
| 119 |
+
width=240
|
| 120 |
+
height=340
|
| 121 |
+
|
| 122 |
with gr.Row():
|
| 123 |
+
with gr.Column(min_width=240,scale=3): # Adjust scale for proper sizing
|
| 124 |
+
image_input = gr.Image(type="numpy", label="Upload Image", height=height)
|
| 125 |
+
with gr.Column(scale=1,min_width=50):
|
| 126 |
+
gr.Examples(examples=examples, inputs=image_input, examples_per_page=10, elem_id="example_img")
|
| 127 |
+
process_button = gr.Button("Nude!")
|
| 128 |
|
| 129 |
def update_status(img):
|
| 130 |
processed_img = inference(img)
|