arxivgpt kim commited on
Commit
3c1843e
โ€ข
1 Parent(s): c6bc209

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -0
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()