Charlie Li
commited on
Commit
•
a8f430e
1
Parent(s):
312a468
add full page
Browse files- app.py +35 -0
- full_page/danke.svg +0 -0
- full_page/multilingual_demo.svg +0 -0
- full_page/unsplash_frame.svg +0 -0
app.py
CHANGED
@@ -239,4 +239,39 @@ with gr.Blocks() as app:
|
|
239 |
|
240 |
gr.HTML(html_content)
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
app.launch()
|
|
|
239 |
|
240 |
gr.HTML(html_content)
|
241 |
|
242 |
+
gr.Markdown("## Scale Up to Full Page")
|
243 |
+
|
244 |
+
svg1_content = get_svg_content("full_page/danke.svg")
|
245 |
+
svg2_content = get_svg_content("full_page/multilingual_demo.svg")
|
246 |
+
svg3_content = get_svg_content("full_page/unsplash_frame.svg")
|
247 |
+
|
248 |
+
svg_html_template = """
|
249 |
+
<div style="display: block;">
|
250 |
+
<div>
|
251 |
+
<div style="margin-bottom: 10px;">{}</div>
|
252 |
+
<p style="text-align: center;">{}</p>
|
253 |
+
</div>
|
254 |
+
<div>
|
255 |
+
<div style="margin-bottom: 10px;">{}</div>
|
256 |
+
<p style="text-align: center;">{}</p>
|
257 |
+
</div>
|
258 |
+
<div>
|
259 |
+
<div style="margin-bottom: 10px;">{}</div>
|
260 |
+
<p style="text-align: center;">{}</p>
|
261 |
+
</div>
|
262 |
+
</div>
|
263 |
+
"""
|
264 |
+
|
265 |
+
full_svg_display = svg_html_template.format(
|
266 |
+
svg1_content,
|
267 |
+
'Writings on the beach. <a href="https://unsplash.com/photos/text-rG-PerMFjFA">Credit</a>',
|
268 |
+
svg2_content,
|
269 |
+
"Multilingual handwriting.",
|
270 |
+
svg3_content,
|
271 |
+
"Handwriting in a frame. <a href='https://unsplash.com/photos/white-wooden-framed-white-board-t7fLWMQl2Lw'>Credit</a>",
|
272 |
+
)
|
273 |
+
|
274 |
+
gr.HTML(full_svg_display)
|
275 |
+
|
276 |
+
|
277 |
app.launch()
|
full_page/danke.svg
ADDED
full_page/multilingual_demo.svg
ADDED
full_page/unsplash_frame.svg
ADDED