Spaces:
Running
Running
sab
commited on
Commit
•
ed05f4c
1
Parent(s):
aa14eed
fix layout
Browse files
app.py
CHANGED
@@ -112,8 +112,8 @@ demo = gr.Interface(
|
|
112 |
fn=process,
|
113 |
inputs=image,
|
114 |
outputs=[output_slider, gr.File(label="output png file")],
|
115 |
-
title="🫧 Snap Clean 🧽",
|
116 |
-
description=config.DESCRIPTION
|
117 |
)
|
118 |
|
119 |
|
|
|
112 |
fn=process,
|
113 |
inputs=image,
|
114 |
outputs=[output_slider, gr.File(label="output png file")],
|
115 |
+
#title="🫧 Snap Clean 🧽",
|
116 |
+
description=config.DESCRIPTION + config.BUY_ME_A_COFFE
|
117 |
)
|
118 |
|
119 |
|
config.py
CHANGED
@@ -8,15 +8,7 @@ DEFAULT_SEED = 124
|
|
8 |
DEFAULT_NUM_INFERENCE_STEPS = 24
|
9 |
DEFAULT_TRUE_GUIDANCE_SCALE = 3.5
|
10 |
|
11 |
-
|
12 |
-
<a href="https://buymeacoffee.com/thesab" target="_blank">
|
13 |
-
<button style="background-color: #FFDD00; border: none; color: black; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; border-radius: 10px;">
|
14 |
-
☕ Buy Me a Coffee
|
15 |
-
</button>
|
16 |
-
</a>
|
17 |
-
"""
|
18 |
-
|
19 |
-
DESCRIPTION = f"""
|
20 |
<div style="max-width: 600px; margin: auto; font-family: Arial, sans-serif; color: #333;">
|
21 |
r <h1 style="text-align: center; color: #fff;">🧽🫧Snap Clean!</h1>
|
22 |
<p style="text-align: center; font-size: 1.1em; line-height: 1.6;">
|
@@ -24,9 +16,27 @@ Remove Unwanted Objects from Photos.
|
|
24 |
</p>
|
25 |
<p style="text-align: center; font-size: 1.1em; line-height: 1.6;">
|
26 |
</p>
|
27 |
-
|
28 |
-
|
29 |
-
</div>
|
30 |
-
</div>
|
31 |
"""
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
DEFAULT_NUM_INFERENCE_STEPS = 24
|
9 |
DEFAULT_TRUE_GUIDANCE_SCALE = 3.5
|
10 |
|
11 |
+
DESCRIPTION = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<div style="max-width: 600px; margin: auto; font-family: Arial, sans-serif; color: #333;">
|
13 |
r <h1 style="text-align: center; color: #fff;">🧽🫧Snap Clean!</h1>
|
14 |
<p style="text-align: center; font-size: 1.1em; line-height: 1.6;">
|
|
|
16 |
</p>
|
17 |
<p style="text-align: center; font-size: 1.1em; line-height: 1.6;">
|
18 |
</p>
|
19 |
+
</div>
|
20 |
+
<div>
|
|
|
|
|
21 |
"""
|
22 |
|
23 |
+
|
24 |
+
|
25 |
+
# JavaScript to append the Buy Me a Coffee button to the bottom of the page
|
26 |
+
BUY_ME_A_COFFE = """
|
27 |
+
<script type="text/javascript">
|
28 |
+
document.addEventListener("DOMContentLoaded", function() {
|
29 |
+
var coffeeButton = document.createElement("div");
|
30 |
+
coffeeButton.innerHTML = `
|
31 |
+
<div style="text-align: center; margin-top: 20px;">
|
32 |
+
<a href="https://buymeacoffee.com/thesab" target="_blank">
|
33 |
+
<button style="background-color: #FFDD00; border: none; color: black; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; border-radius: 10px;">
|
34 |
+
☕ Buy Me a Coffee
|
35 |
+
</button>
|
36 |
+
</a>
|
37 |
+
</div>
|
38 |
+
`;
|
39 |
+
document.body.appendChild(coffeeButton);
|
40 |
+
});
|
41 |
+
</script>
|
42 |
+
"""
|