apolinario commited on
Commit
c05db7a
1 Parent(s): b9be232
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +1 -1
app.py CHANGED
@@ -65,10 +65,10 @@ def run(prompt, aspect_ratio, model):
65
 
66
  rudalle_ar = RuDalleAspectRatio(
67
  dalle=dalle, vae=vae, tokenizer=tokenizer,
68
- aspect_ratio=aspect_ratio_value, bs=2, device=device
69
  )
70
 
71
- _, result_pil_images = rudalle_ar.generate_images(prompt, top_k, 0.975, 2)
72
  #np_images = map(image_to_np,result_pil_images)
73
  #np_grid = np_gallery(np.array(list(np_images)),2)
74
  #result_grid = Image.fromarray(np_grid)
@@ -76,7 +76,7 @@ def run(prompt, aspect_ratio, model):
76
  return(result_pil_images[0], None)
77
 
78
  image = gr.outputs.Image(type="pil", label="Your result")
79
- css = ".output-image{height: 528px !important}"
80
  iface = gr.Interface(fn=run, inputs=[
81
  gr.inputs.Textbox(label="Prompt (if not in Russian, it will be automatically translated to Russian)",default="an amusement park in mars"),
82
  #gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=45,maximum=50,minimum=1,step=1),
 
65
 
66
  rudalle_ar = RuDalleAspectRatio(
67
  dalle=dalle, vae=vae, tokenizer=tokenizer,
68
+ aspect_ratio=aspect_ratio_value, bs=1, device=device
69
  )
70
 
71
+ _, result_pil_images = rudalle_ar.generate_images(prompt, top_k, 0.975, 1)
72
  #np_images = map(image_to_np,result_pil_images)
73
  #np_grid = np_gallery(np.array(list(np_images)),2)
74
  #result_grid = Image.fromarray(np_grid)
 
76
  return(result_pil_images[0], None)
77
 
78
  image = gr.outputs.Image(type="pil", label="Your result")
79
+ css = ".output-image{height: 260px !important}"
80
  iface = gr.Interface(fn=run, inputs=[
81
  gr.inputs.Textbox(label="Prompt (if not in Russian, it will be automatically translated to Russian)",default="an amusement park in mars"),
82
  #gr.inputs.Slider(label="Steps - more steps can increase quality but will take longer to generate",default=45,maximum=50,minimum=1,step=1),
requirements.txt CHANGED
@@ -4,4 +4,4 @@ gitpython
4
  rudalle==1.0.0
5
  einops
6
  numpy
7
- googletrans
 
4
  rudalle==1.0.0
5
  einops
6
  numpy
7
+ googletrans==3.1.0a0