englissi commited on
Commit
e995cac
·
verified ·
1 Parent(s): b1804a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -71,16 +71,33 @@ prayer_options = [
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()
 
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
+ 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()