Spaces:
Running
Running
Update src/app.py
Browse files- src/app.py +6 -57
src/app.py
CHANGED
|
@@ -177,65 +177,14 @@ def on_change_prompt(img: Image.Image | None, prompt: str | None):
|
|
| 177 |
return gr.update(interactive=bool(img and prompt))
|
| 178 |
|
| 179 |
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
Object Cutter Powered By Refiners
|
| 185 |
-
</h1>
|
| 186 |
-
|
| 187 |
-
<div style="
|
| 188 |
-
display: flex;
|
| 189 |
-
align-items: center;
|
| 190 |
-
justify-content: center;
|
| 191 |
-
gap: 0.5rem;
|
| 192 |
-
margin-bottom: 0.5rem;
|
| 193 |
-
font-size: 1.25rem;
|
| 194 |
-
flex-wrap: wrap;
|
| 195 |
-
">
|
| 196 |
-
<a href="https://github.com/finegrain-ai/refiners" target="_blank">[Refiners]</a>
|
| 197 |
-
<a href="https://finegrain.ai/" target="_blank">[Finegrain]</a>
|
| 198 |
-
<a
|
| 199 |
-
href="https://huggingface.co/spaces/finegrain/finegrain-object-eraser"
|
| 200 |
-
target="_blank"
|
| 201 |
-
>[Finegrain Object Eraser]</a>
|
| 202 |
-
<a
|
| 203 |
-
href="https://huggingface.co/spaces/finegrain/finegrain-image-enhancer"
|
| 204 |
-
target="_blank"
|
| 205 |
-
>[Finegrain Image Enhancer]</a>
|
| 206 |
-
</div>
|
| 207 |
-
|
| 208 |
-
<p>
|
| 209 |
-
Create high-quality HD cutouts for any object in your image with just a text prompt — no manual work required!
|
| 210 |
-
<br>
|
| 211 |
-
The object will be available on a transparent background, ready to paste elsewhere.
|
| 212 |
-
</p>
|
| 213 |
-
|
| 214 |
-
<p>
|
| 215 |
-
This space uses the
|
| 216 |
-
<a
|
| 217 |
-
href="https://huggingface.co/finegrain/finegrain-box-segmenter"
|
| 218 |
-
target="_blank"
|
| 219 |
-
>Finegrain Box Segmenter model</a>,
|
| 220 |
-
trained with a mix of natural data curated by Finegrain and
|
| 221 |
-
<a
|
| 222 |
-
href="https://huggingface.co/datasets/Nfiniteai/product-masks-sample"
|
| 223 |
-
target="_blank"
|
| 224 |
-
>synthetic data provided by Nfinite</a>.
|
| 225 |
-
<br>
|
| 226 |
-
It is powered by Refiners, our open source micro-framework for simple foundation model adaptation.
|
| 227 |
-
If you enjoyed it, please consider starring Refiners on GitHub!
|
| 228 |
-
</p>
|
| 229 |
-
|
| 230 |
-
<a href="https://github.com/finegrain-ai/refiners" target="_blank">
|
| 231 |
-
<img src="https://img.shields.io/github/stars/finegrain-ai/refiners?style=social" />
|
| 232 |
-
</a>
|
| 233 |
-
|
| 234 |
-
</center>
|
| 235 |
"""
|
| 236 |
|
| 237 |
-
|
| 238 |
-
|
| 239 |
|
| 240 |
with gr.Tab("By prompt", id="tab_prompt"):
|
| 241 |
with gr.Row():
|
|
|
|
| 177 |
return gr.update(interactive=bool(img and prompt))
|
| 178 |
|
| 179 |
|
| 180 |
+
css = """
|
| 181 |
+
footer {
|
| 182 |
+
visibility: hidden;
|
| 183 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
"""
|
| 185 |
|
| 186 |
+
|
| 187 |
+
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=csstheme="Nymbo/Nymbo_Theme", css=css) as demo:
|
| 188 |
|
| 189 |
with gr.Tab("By prompt", id="tab_prompt"):
|
| 190 |
with gr.Row():
|