Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,6 @@ css = """
|
|
84 |
#col-container {max-width: 910px; margin-left: auto; margin-right: auto;}
|
85 |
a {text-decoration-line: underline; font-weight: 600;}
|
86 |
"""
|
87 |
-
|
88 |
with gr.Blocks(css=css) as demo:
|
89 |
with gr.Column(elem_id="col-container"):
|
90 |
gr.Markdown(
|
@@ -102,13 +101,15 @@ with gr.Blocks(css=css) as demo:
|
|
102 |
submit_btn = gr.Button('이야기와 그림을 만들어 주세요')
|
103 |
next_chapter_btn = gr.Button('다음 이야기')
|
104 |
save_pdf_btn = gr.Button('PDF로 저장하기')
|
105 |
-
with gr.Column():
|
106 |
chapter_story = gr.Markdown(label="이야기", elem_id="chapter_story")
|
107 |
chapter_image = gr.Image(label="그림", elem_id="chapter_image")
|
108 |
-
|
|
|
109 |
|
110 |
submit_btn.click(fn=infer, inputs=[image_in, audience, keyword_in, protagonist_in], outputs=[chapter_story, chapter_image, table_markdown])
|
111 |
next_chapter_btn.click(fn=lambda: next_chapter(audience=audience.value, keyword=keyword_in.value, protagonist=protagonist_in.value), outputs=[chapter_story, chapter_image, table_markdown])
|
112 |
save_pdf_btn.click(fn=save_as_pdf, outputs=gr.File(label="PDF 다운로드"))
|
113 |
|
114 |
demo.queue(max_size=12).launch()
|
|
|
|
84 |
#col-container {max-width: 910px; margin-left: auto; margin-right: auto;}
|
85 |
a {text-decoration-line: underline; font-weight: 600;}
|
86 |
"""
|
|
|
87 |
with gr.Blocks(css=css) as demo:
|
88 |
with gr.Column(elem_id="col-container"):
|
89 |
gr.Markdown(
|
|
|
101 |
submit_btn = gr.Button('이야기와 그림을 만들어 주세요')
|
102 |
next_chapter_btn = gr.Button('다음 이야기')
|
103 |
save_pdf_btn = gr.Button('PDF로 저장하기')
|
104 |
+
with gr.Column(elem_id="component-10"):
|
105 |
chapter_story = gr.Markdown(label="이야기", elem_id="chapter_story")
|
106 |
chapter_image = gr.Image(label="그림", elem_id="chapter_image")
|
107 |
+
|
108 |
+
table_markdown = gr.Markdown(label="이야기와 그림 정리", elem_id="table_markdown", width="100%")
|
109 |
|
110 |
submit_btn.click(fn=infer, inputs=[image_in, audience, keyword_in, protagonist_in], outputs=[chapter_story, chapter_image, table_markdown])
|
111 |
next_chapter_btn.click(fn=lambda: next_chapter(audience=audience.value, keyword=keyword_in.value, protagonist=protagonist_in.value), outputs=[chapter_story, chapter_image, table_markdown])
|
112 |
save_pdf_btn.click(fn=save_as_pdf, outputs=gr.File(label="PDF 다운로드"))
|
113 |
|
114 |
demo.queue(max_size=12).launch()
|
115 |
+
|