Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def generate_static_badge(label, message, color, label_color, logo, logo_color,
|
|
29 |
html_code = f'<img src="{badge_url}" alt="badge">'
|
30 |
|
31 |
badge_preview = f"""
|
32 |
-
<div style='padding:20px; background: #fefefe; border-radius: 12px;
|
33 |
{html_code}
|
34 |
</div>
|
35 |
"""
|
@@ -62,8 +62,9 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
|
|
62 |
</div>
|
63 |
""")
|
64 |
|
65 |
-
|
66 |
-
|
|
|
67 |
|
68 |
with gr.Row():
|
69 |
label = gr.Textbox(label="Label", placeholder="์: build")
|
@@ -82,6 +83,28 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
|
|
82 |
for inp in inputs:
|
83 |
inp.change(fn=generate_static_badge, inputs=inputs, outputs=[out_code, out_preview])
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
# ์คํ
|
86 |
if __name__ == "__main__":
|
87 |
demo.launch()
|
|
|
29 |
html_code = f'<img src="{badge_url}" alt="badge">'
|
30 |
|
31 |
badge_preview = f"""
|
32 |
+
<div style='padding:20px; background: #fefefe; border-radius: 12px; display: flex; justify-content: center;'>
|
33 |
{html_code}
|
34 |
</div>
|
35 |
"""
|
|
|
62 |
</div>
|
63 |
""")
|
64 |
|
65 |
+
with gr.Row():
|
66 |
+
out_code = gr.Code(label="HTML Snippet", language="html")
|
67 |
+
out_preview = gr.HTML(label="Badge Preview")
|
68 |
|
69 |
with gr.Row():
|
70 |
label = gr.Textbox(label="Label", placeholder="์: build")
|
|
|
83 |
for inp in inputs:
|
84 |
inp.change(fn=generate_static_badge, inputs=inputs, outputs=[out_code, out_preview])
|
85 |
|
86 |
+
gr.HTML("""
|
87 |
+
<hr style="margin-top: 50px;">
|
88 |
+
<h3 style="text-align:center;">๐ Example Badges for Popular Platforms</h3>
|
89 |
+
<div align="center" style="margin-top: 15px;">
|
90 |
+
<a href="https://github.com/openfreeai" style="margin: 4px;">
|
91 |
+
<img src="https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white" alt="GitHub">
|
92 |
+
</a>
|
93 |
+
<a href="https://twitter.com/openfree_ai" style="margin: 4px;">
|
94 |
+
<img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" alt="Twitter">
|
95 |
+
</a>
|
96 |
+
<a href="https://www.linkedin.com/company/openfreeai" style="margin: 4px;">
|
97 |
+
<img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn">
|
98 |
+
</a>
|
99 |
+
<a href="https://youtube.com/@openfreeai" style="margin: 4px;">
|
100 |
+
<img src="https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white" alt="YouTube">
|
101 |
+
</a>
|
102 |
+
<a href="https://huggingface.co/openfreeai" style="margin: 4px;">
|
103 |
+
<img src="https://img.shields.io/badge/HuggingFace-FCC72E?style=for-the-badge&logo=huggingface&logoColor=black" alt="HuggingFace">
|
104 |
+
</a>
|
105 |
+
</div>
|
106 |
+
""")
|
107 |
+
|
108 |
# ์คํ
|
109 |
if __name__ == "__main__":
|
110 |
demo.launch()
|