englissi commited on
Commit
23deded
Β·
verified Β·
1 Parent(s): 0654331

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -72,32 +72,32 @@ prayer_options = [
72
  music_options = ["μŒμ•… 1", "μŒμ•… 2"]
73
 
74
  # 이미지 URL
75
- image_url = "https://huggingface.co/datasets/englissi/bgm/blob/main/image_35547.png"
 
 
 
 
 
 
 
 
76
 
77
  # μΈν„°νŽ˜μ΄μŠ€ ꡬ성 μš”μ†Œ
78
  image_html = f'<img src="{image_url}" alt="Prayer Image" style="display:block; margin:auto;">'
79
- image_textbox = gr.HTML(image_html)
80
  prayer_dropdown = gr.Dropdown(choices=prayer_options, label="기도문 선택")
81
  music_dropdown = gr.Dropdown(choices=music_options, label="λ°°κ²½μŒμ•… 선택")
82
  output_text = gr.Textbox(label="기도문")
83
  output_html = gr.HTML(label="λ°°κ²½μŒμ•…")
84
 
85
  # μΈν„°νŽ˜μ΄μŠ€ 생성
86
- interface = gr.Interface(
87
- fn=show_prayer_and_music,
88
- inputs=[prayer_dropdown, music_dropdown],
89
- outputs=[output_text, output_html],
90
- live=True
91
- )
92
-
93
- # 이미지 ν…μŠ€νŠΈλ°•μŠ€λ₯Ό μΈν„°νŽ˜μ΄μŠ€ 상단에 μΆ”κ°€
94
  interface = gr.Blocks()
95
  with interface:
96
  gr.HTML(image_html)
97
- gr.Interface(
98
- fn=show_prayer_and_music,
99
- inputs=[prayer_dropdown, music_dropdown],
100
- outputs=[output_text, output_html]
101
- )
 
102
 
103
  interface.launch()
 
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.Textbox(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()