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()