notice / app.py
arxivgpt kim
Create app.py
3c1843e verified
raw
history blame
No virus
1.07 kB
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()