Shad0ws commited on
Commit
5f550df
1 Parent(s): 00e084d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -52,8 +52,8 @@ def storyGPT(key, name, situation, direction):
52
  for i in range(len(story_parts)):
53
  story_parts[i] = story_parts[i].replace(". ", ".\n\n")
54
 
55
- # return (story_parts[0], illustration_parts[0], story_parts[1], illustration_parts[1], story_parts[2], illustration_parts[2], story_parts[3], illustration_parts[3])
56
- return (story_parts[0], illustration_parts[0], story_parts[1], illustration_parts[1], story_parts[2], illustration_parts[2])
57
 
58
 
59
  # EXAMPLE
@@ -108,14 +108,14 @@ with gr.Blocks(title="StoryGPT", css="#button{background-color:#4CAF50} #title{t
108
  illustration2 = gr.Image(
109
  show_label=False, brush_radius=0, lines=9).style(height=200)
110
 
111
- # with gr.Row(variant="compact").style(equal_height=True):
112
- # with gr.Column(scale=3):
113
- # story3 = gr.Textbox(show_label=False, lines=9).style(
114
- # container=False)
115
 
116
- # with gr.Column(scale=1):
117
- # illustration3 = gr.Image(
118
- # show_label=False, brush_radius=0).style(height=200)
119
 
120
  # with gr.Row(variant="compact").style(equal_height=True):
121
  # with gr.Column(scale=3):
@@ -128,7 +128,7 @@ with gr.Blocks(title="StoryGPT", css="#button{background-color:#4CAF50} #title{t
128
 
129
  inputs = [key, name, situation, direction]
130
  # outputs = [story1, illustration1, story2,illustration2, story3, illustration3, story4, illustration4]
131
- outputs = [story1, illustration1, story2,illustration2]
132
 
133
  Generate_btn.click(storyGPT, inputs=inputs, outputs=outputs)
134
 
 
52
  for i in range(len(story_parts)):
53
  story_parts[i] = story_parts[i].replace(". ", ".\n\n")
54
 
55
+ return (story_parts[0], illustration_parts[0], story_parts[1], illustration_parts[1], story_parts[2], illustration_parts[2], story_parts[3], illustration_parts[3])
56
+ # return (story_parts[0], illustration_parts[0], story_parts[1], illustration_parts[1], story_parts[2], illustration_parts[2])
57
 
58
 
59
  # EXAMPLE
 
108
  illustration2 = gr.Image(
109
  show_label=False, brush_radius=0, lines=9).style(height=200)
110
 
111
+ with gr.Row(variant="compact").style(equal_height=True):
112
+ with gr.Column(scale=3):
113
+ story3 = gr.Textbox(show_label=False, lines=9).style(
114
+ container=False)
115
 
116
+ with gr.Column(scale=1):
117
+ illustration3 = gr.Image(
118
+ show_label=False, brush_radius=0).style(height=200)
119
 
120
  # with gr.Row(variant="compact").style(equal_height=True):
121
  # with gr.Column(scale=3):
 
128
 
129
  inputs = [key, name, situation, direction]
130
  # outputs = [story1, illustration1, story2,illustration2, story3, illustration3, story4, illustration4]
131
+ outputs = [story1, illustration1, story2,illustration2, story3, illustration3]
132
 
133
  Generate_btn.click(storyGPT, inputs=inputs, outputs=outputs)
134