mrolando commited on
Commit
25bba68
·
1 Parent(s): 5a72a8b
Files changed (2) hide show
  1. app.py +3 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -29,6 +29,8 @@ def get_completion(prompt,steps,guidance,width,height,negative_prompt):
29
  # negative_prompt = translator.translate(negative_prompt, src='es',dest="en").text
30
  print(prompt)
31
  prompt = translate_text(prompt)
 
 
32
  print(prompt)
33
  return pipeline(prompt,
34
  num_inference_steps=steps,
@@ -73,7 +75,7 @@ with gr.Blocks() as demo:
73
  height = gr.Slider(label="Alto", minimum=64, maximum=256, step=64, value=512)
74
  with gr.Column():
75
  output = gr.Image(label="Resultado",height=512, width=512) #Move the output up too
76
- examples = gr.Examples(inputs=[prompt],examples=["A dog in the park"])
77
 
78
  btn.click(fn=get_completion, inputs=[prompt,steps,guidance,width,height,negative_prompt], outputs=[output]) #steps,guidance,width,height]
79
 
 
29
  # negative_prompt = translator.translate(negative_prompt, src='es',dest="en").text
30
  print(prompt)
31
  prompt = translate_text(prompt)
32
+ negative_prompt = translate_text(negative_prompt)
33
+
34
  print(prompt)
35
  return pipeline(prompt,
36
  num_inference_steps=steps,
 
75
  height = gr.Slider(label="Alto", minimum=64, maximum=256, step=64, value=512)
76
  with gr.Column():
77
  output = gr.Image(label="Resultado",height=512, width=512) #Move the output up too
78
+ examples = gr.Examples(inputs=[prompt,negative_prompt],examples=["Un perro en el parque","low quality"])
79
 
80
  btn.click(fn=get_completion, inputs=[prompt,steps,guidance,width,height,negative_prompt], outputs=[output]) #steps,guidance,width,height]
81
 
requirements.txt CHANGED
@@ -4,4 +4,5 @@ transformers
4
  diffusers
5
  #googletrans==3.1.0a0
6
  sacremoses
7
- sentencepiece
 
 
4
  diffusers
5
  #googletrans==3.1.0a0
6
  sacremoses
7
+ sentencepiece
8
+ accelerate