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