JUNGU commited on
Commit
4998db3
·
1 Parent(s): bfa801f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -35,11 +35,12 @@ def infer(image_input, audience, keyword, protagonist):
35
  chapter_story = chat_completion.choices[0].message.content
36
  chapters.append(chapter_story)
37
  images.append(current_image_url)
38
-
39
- return {
40
- "chapter1_story": chapters[0],
41
- "chapter1_image": images[0],
42
- }, gr.Group.update(visible=True)
 
43
 
44
  css = """
45
  #col-container {max-width: 910px; margin-left: auto; margin-right: auto;}
@@ -64,7 +65,6 @@ with gr.Blocks(css=css) as demo:
64
  with gr.Column():
65
  chapter1_story = gr.Markdown(label="Chapter 1: 이야기", elem_id="chapter1_story")
66
  chapter1_image = gr.Image(label="Chapter 1: 그림", elem_id="chapter1_image")
67
-
68
  submit_btn.click(fn=infer, inputs=[image_in, audience, keyword_in, protagonist_in],
69
  outputs=[chapter1_story, chapter1_image])
70
  demo.queue(max_size=12).launch()
 
35
  chapter_story = chat_completion.choices[0].message.content
36
  chapters.append(chapter_story)
37
  images.append(current_image_url)
38
+
39
+ return chapters[0], images[0]
40
+ # return {
41
+ # "chapter1_story": chapters[0],
42
+ # "chapter1_image": images[0],
43
+ # }, gr.Group.update(visible=True)
44
 
45
  css = """
46
  #col-container {max-width: 910px; margin-left: auto; margin-right: auto;}
 
65
  with gr.Column():
66
  chapter1_story = gr.Markdown(label="Chapter 1: 이야기", elem_id="chapter1_story")
67
  chapter1_image = gr.Image(label="Chapter 1: 그림", elem_id="chapter1_image")
 
68
  submit_btn.click(fn=infer, inputs=[image_in, audience, keyword_in, protagonist_in],
69
  outputs=[chapter1_story, chapter1_image])
70
  demo.queue(max_size=12).launch()