Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,31 +75,11 @@ tab2 = gr.Interface(fn, inputs=text, outputs=[slider2, gr.File(label="output png
|
|
| 75 |
tab3 = gr.Interface(process_file, inputs=image2, outputs=png_file, examples=["giraffe.jpg"], api_name="png")
|
| 76 |
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
hyperlinks = {
|
| 81 |
-
"BRIA.AI": "https://bria.ai",
|
| 82 |
-
"Commercial use license": "https://go.bria.ai/3ZCBTLH",
|
| 83 |
-
"Model card": "https://huggingface.co/briaai/RMBG-2.0",
|
| 84 |
-
"Blog": "https://blog.bria.ai/brias-new-state-of-the-art-remove-background-2.0-outperforms-the-competition"
|
| 85 |
-
}
|
| 86 |
|
| 87 |
-
description = f"""
|
| 88 |
-
Background removal model developed by <a href='{hyperlinks["BRIA.AI"]}' target='_blank'>BRIA.AI</a>, trained on a carefully selected dataset, and is available as an open-source model for non-commercial use.
|
| 89 |
-
For testing upload your image and wait.
|
| 90 |
-
<a href='{hyperlinks["Commercial use license"]}' target='_blank'>Commercial use license</a> |
|
| 91 |
-
<a href='{hyperlinks["Model card"]}' target='_blank'>Model card</a> |
|
| 92 |
-
<a href='{hyperlinks["Blog"]}' target='_blank'>Blog</a>
|
| 93 |
-
"""
|
| 94 |
|
| 95 |
-
tab1 = gr.inputs.Image(label="Upload Image")
|
| 96 |
-
tab2 = gr.inputs.Textbox(label="Enter URL")
|
| 97 |
|
| 98 |
-
demo = gr.TabbedInterface(
|
| 99 |
-
[tab1, tab2],
|
| 100 |
-
["input image", "input url"],
|
| 101 |
-
title="RMBG-2.0 for background removal",
|
| 102 |
-
description=description
|
| 103 |
)
|
| 104 |
|
| 105 |
if __name__ == "__main__":
|
|
|
|
| 75 |
tab3 = gr.Interface(process_file, inputs=image2, outputs=png_file, examples=["giraffe.jpg"], api_name="png")
|
| 76 |
|
| 77 |
|
| 78 |
+
demo = gr.TabbedInterface(
|
| 79 |
+
[tab1, tab2], ["input image", "input url"], title="RMBG-2.0 for background removal <br> To purchase a commercial license, simply click <a href='https://go.bria.ai/3ZCBTLH' target='_blank'><b>Here</b></a>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
|
|
|
|
|
|
| 82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
)
|
| 84 |
|
| 85 |
if __name__ == "__main__":
|