Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,44 +111,6 @@ def remove_background(image):
|
|
| 111 |
|
| 112 |
return mask_path, reverse_mask_path, foreground_path, background_path
|
| 113 |
|
| 114 |
-
css = """
|
| 115 |
-
body {
|
| 116 |
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
| 117 |
-
}
|
| 118 |
-
.gradio-container {
|
| 119 |
-
background: white;
|
| 120 |
-
}
|
| 121 |
-
.gradio-button {
|
| 122 |
-
font-family: inherit;
|
| 123 |
-
font-size: 16px;
|
| 124 |
-
font-weight: bold;
|
| 125 |
-
color: #000000;
|
| 126 |
-
background: linear-gradient(
|
| 127 |
-
135deg,
|
| 128 |
-
#e0f7fa, #e8f5e9, #fff9c4, #ffebee,
|
| 129 |
-
#f3e5f5, #e1f5fe, #fff3e0, #e8eaf6
|
| 130 |
-
);
|
| 131 |
-
background-size: 400% 400%;
|
| 132 |
-
animation: gradient-animation 15s ease infinite;
|
| 133 |
-
border: 2px solid black;
|
| 134 |
-
border-radius: 10px;
|
| 135 |
-
}
|
| 136 |
-
.gradio-button:hover {
|
| 137 |
-
background: linear-gradient(
|
| 138 |
-
135deg,
|
| 139 |
-
#b2ebf2, #c8e6c9, #fff176, #ffcdd2,
|
| 140 |
-
#e1bee7, #b3e5fc, #ffe0b2, #c5cae9
|
| 141 |
-
);
|
| 142 |
-
background-size: 400% 400%;
|
| 143 |
-
animation: gradient-animation 15s ease infinite;
|
| 144 |
-
}
|
| 145 |
-
@keyframes gradient-animation {
|
| 146 |
-
0% { background-position: 0% 50%; }
|
| 147 |
-
50% { background-position: 100% 50%; }
|
| 148 |
-
100% { background-position: 0% 50%; }
|
| 149 |
-
}
|
| 150 |
-
"""
|
| 151 |
-
|
| 152 |
iface = gr.Interface(
|
| 153 |
fn=remove_background,
|
| 154 |
inputs=gr.Image(type="numpy"),
|
|
@@ -158,8 +120,7 @@ iface = gr.Interface(
|
|
| 158 |
gr.Image(type="filepath", label="Foreground"),
|
| 159 |
gr.Image(type="filepath", label="Background")
|
| 160 |
],
|
| 161 |
-
allow_flagging="never"
|
| 162 |
-
css=css
|
| 163 |
)
|
| 164 |
|
| 165 |
if __name__ == "__main__":
|
|
|
|
| 111 |
|
| 112 |
return mask_path, reverse_mask_path, foreground_path, background_path
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
iface = gr.Interface(
|
| 115 |
fn=remove_background,
|
| 116 |
inputs=gr.Image(type="numpy"),
|
|
|
|
| 120 |
gr.Image(type="filepath", label="Foreground"),
|
| 121 |
gr.Image(type="filepath", label="Background")
|
| 122 |
],
|
| 123 |
+
allow_flagging="never"
|
|
|
|
| 124 |
)
|
| 125 |
|
| 126 |
if __name__ == "__main__":
|