Epoching commited on
Commit
5a2d3ac
β€’
1 Parent(s): 1d8ced5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -26,9 +26,6 @@ model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
26
  interpolator = interpolator.Interpolator(model, None)
27
 
28
  def generate_story(choice, input_text):
29
- print(choice)
30
- print(input_text)
31
-
32
  query = "<BOS> <{0}> {1}".format(choice, input_text)
33
 
34
  print(query)
@@ -47,7 +44,6 @@ def generate_images(generated_text):
47
  image_bytes = image_gen(generated_text, steps, width, height, num_images, diversity)
48
 
49
  # Algo from spaces/Gradio-Blocks/latent_gpt2_story/blob/main/app.py
50
- print(len(image_bytes))
51
  generated_images = []
52
  for image in image_bytes[1]:
53
  image_str = image[0]
@@ -112,6 +108,9 @@ with demo:
112
  output_gallery = gr.Gallery(label="Generated Story Images")
113
  output_interpolation = gr.Video(label="Generated Video")
114
 
 
 
 
115
  # Bind functions to buttons
116
  button_gen_story.click(fn=generate_story, inputs=[input_story_type , input_start_text], outputs=output_generated_story)
117
  button_gen_images.click(fn=generate_images, inputs=output_generated_story, outputs=output_gallery)
 
26
  interpolator = interpolator.Interpolator(model, None)
27
 
28
  def generate_story(choice, input_text):
 
 
 
29
  query = "<BOS> <{0}> {1}".format(choice, input_text)
30
 
31
  print(query)
 
44
  image_bytes = image_gen(generated_text, steps, width, height, num_images, diversity)
45
 
46
  # Algo from spaces/Gradio-Blocks/latent_gpt2_story/blob/main/app.py
 
47
  generated_images = []
48
  for image in image_bytes[1]:
49
  image_str = image[0]
 
108
  output_gallery = gr.Gallery(label="Generated Story Images")
109
  output_interpolation = gr.Video(label="Generated Video")
110
 
111
+ with gr.Row():
112
+ gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=gradio-blocks_story_and_video_generation)")
113
+
114
  # Bind functions to buttons
115
  button_gen_story.click(fn=generate_story, inputs=[input_story_type , input_start_text], outputs=output_generated_story)
116
  button_gen_images.click(fn=generate_images, inputs=output_generated_story, outputs=output_gallery)