englissi commited on
Commit
856498f
β€’
1 Parent(s): 17abda6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -24
app.py CHANGED
@@ -71,33 +71,16 @@ prayer_options = [
71
 
72
  music_options = ["μŒμ•… 1", "μŒμ•… 2"]
73
 
74
- # 이미지 URL
75
- image_url = "http://www.sgsarang.org/user/saveDir/awd/P/0/image_35547.png?itemTime=1717509605"
76
-
77
- # 기도 κ°€μ΄λ“œ ν…μŠ€νŠΈ
78
- guide_text = """
79
- <h2>μ˜ˆμˆ˜λ‹˜μ˜ 보혈 기도문</h2>
80
- <p>μ œκ³΅ν•΄ λ“œλ¦¬λŠ” β€˜λ³΄ν˜ˆκΈ°λ„λ¬Έβ€™μ€ 참쑰만 ν•˜μ‹œκ³  ν˜•μ‹ν™”ν•˜μ§€ λ§ˆμ‹­μ‹œμ˜€<br>
81
- 였직 μ„±λ Ήλ‹˜μ˜ 인도함을 λ°›μœΌμ‹œκΈ° λ°”λžλ‹ˆλ‹€<br>
82
- λ‚˜, λ‚΄ μžλ¦¬μ— κ°€μ‘±λ“€μ˜ 이름, 쀑보기도 λŒ€μƒμžμ˜ 이름을 λ„£μ–΄ μ„ ν¬ν•˜μ‹­μ‹œμ˜€</p>
83
- """
84
-
85
- # μΈν„°νŽ˜μ΄μŠ€ ꡬ성 μš”μ†Œ
86
- image_html = f'<img src="{image_url}" alt="Prayer Image" style="display:block; margin:auto;">'
87
  prayer_dropdown = gr.Dropdown(choices=prayer_options, label="기도문 선택")
88
  music_dropdown = gr.Dropdown(choices=music_options, label="λ°°κ²½μŒμ•… 선택")
89
- output_text = gr.TextArea(label="기도문")
90
  output_html = gr.HTML(label="λ°°κ²½μŒμ•…")
91
 
92
- # μΈν„°νŽ˜μ΄μŠ€ 생성
93
- interface = gr.Blocks()
94
- with interface:
95
- gr.HTML(image_html)
96
- gr.HTML(guide_text)
97
- with gr.Row():
98
- prayer_dropdown.render()
99
- music_dropdown.render()
100
- output_text.render()
101
- output_html.render()
102
 
103
  interface.launch()
 
71
 
72
  music_options = ["μŒμ•… 1", "μŒμ•… 2"]
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  prayer_dropdown = gr.Dropdown(choices=prayer_options, label="기도문 선택")
75
  music_dropdown = gr.Dropdown(choices=music_options, label="λ°°κ²½μŒμ•… 선택")
76
+ output_text = gr.Textbox(label="기도문")
77
  output_html = gr.HTML(label="λ°°κ²½μŒμ•…")
78
 
79
+ interface = gr.Interface(
80
+ fn=show_prayer_and_music,
81
+ inputs=[prayer_dropdown, music_dropdown],
82
+ outputs=[output_text, output_html],
83
+ live=True
84
+ )
 
 
 
 
85
 
86
  interface.launch()