File size: 1,068 Bytes
3c1843e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
import gradio as gr
# ๊ณต์ง์ฌํญ ์์
notices = [
"๊ณต์ง์ฌํญ 1: ์๋ก์ด ์
๋ฐ์ดํธ๊ฐ ์ถ์๋์์ต๋๋ค.",
"๊ณต์ง์ฌํญ 2: ์์คํ
์ ๊ฒ ์๋ด.",
"๊ณต์ง์ฌํญ 3: ์ฌ์ฉ์ ์ค๋ฌธ์กฐ์ฌ ์ฐธ์ฌ ์์ฒญ."
]
# ๋งํฌ ๋ฆฌ์คํธ ์์
links = [
("์
๋ฐ์ดํธ ๋ด์ฉ ๋ณด๊ธฐ", "https://example.com/update"),
("์์คํ
์ ๊ฒ ์ผ์ ", "https://example.com/maintenance"),
("์ค๋ฌธ์กฐ์ฌ ์ฐธ์ฌ", "https://example.com/survey")
]
def show_notices():
# ๊ณต์ง์ฌํญ ๋ชฉ๋ก์ HTML ํ์์ผ๋ก ๋ณํ
html_output = "<ul>"
for notice in notices:
html_output += f"<li>{notice}</li>"
html_output += "</ul>"
# ๋งํฌ๋ฅผ HTML ํ
์ด๋ธ๋ก ๋ณํ
html_output += "<table>"
for title, url in links:
html_output += f"<tr><td>{title}</td><td><a href='{url}' target='_blank'>{url}</a></td></tr>"
html_output += "</table>"
return html_output
iface = gr.Interface(
fn=show_notices,
inputs=[],
outputs=gr.HTML(),
title="๊ณต์ง์ฌํญ ๋ฐ ์ ์ฉํ ๋งํฌ"
)
iface.launch()
|