bkhmsi commited on
Commit
fa9dbc5
1 Parent(s): aec8d80

still trying to fix issue

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -275,8 +275,10 @@ def run_main_app(semantic_concept, word, script, prompt_suffix, font_name, num_s
275
  # writer = imageio.get_writer(filename, fps=20)
276
  # for frame in gif_frames: writer.append_data(frame)
277
  # writer.close()
278
- # imageio.mimsave(filename, np.array(gif_frames).astype(np.uint8))
279
- imageio.mimsave(filename, np.array(gif_frames))
 
 
280
 
281
  yield gr.update(value=filename_init,visible=True),gr.update(visible=False),gr.update(value=filename,visible=True),gr.update(value=cfg.caption,visible=True),gr.update(value=cfg.seed,visible=True)
282
 
@@ -391,11 +393,11 @@ with gr.Blocks() as demo:
391
  with gr.Row():
392
  # examples
393
  examples = [
394
- ["قطة", "Cat", "Arabic", 250, 42],
395
- ["猫", "Cat", "Simplified Chinese", 250, 42],
396
- ["γάτα", "Cat", "Greek", 250, 42],
397
- ["кошка", "Cat", "Cyrillic", 250, 42],
398
- ["பூனை", "Cat", "Tamil", 250, 42],
399
  ]
400
 
401
  demo.queue(max_size=10, concurrency_count=2)
 
275
  # writer = imageio.get_writer(filename, fps=20)
276
  # for frame in gif_frames: writer.append_data(frame)
277
  # writer.close()
278
+ print(gif_frames[0])
279
+ print(len(gif_frames))
280
+ imageio.mimsave(filename, np.array(gif_frames).astype(np.uint8))
281
+ # imageio.mimsave(filename, np.array(gif_frames))
282
 
283
  yield gr.update(value=filename_init,visible=True),gr.update(visible=False),gr.update(value=filename,visible=True),gr.update(value=cfg.caption,visible=True),gr.update(value=cfg.seed,visible=True)
284
 
 
393
  with gr.Row():
394
  # examples
395
  examples = [
396
+ ["قطة", "Cat", "Arabic", 10, 42],
397
+ # ["猫", "Cat", "Simplified Chinese", 250, 42],
398
+ # ["γάτα", "Cat", "Greek", 250, 42],
399
+ # ["кошка", "Cat", "Cyrillic", 250, 42],
400
+ # ["பூனை", "Cat", "Tamil", 250, 42],
401
  ]
402
 
403
  demo.queue(max_size=10, concurrency_count=2)