Yaron Koresh commited on
Commit
408049c
·
verified ·
1 Parent(s): 62c9b9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,7 +12,7 @@ from pathos.multiprocessing import ProcessingPool as ProcessPoolExecutor
12
  import requests
13
  from lxml.html import fromstring
14
 
15
- pool = ProcessPoolExecutor(1000)
16
  pool.__enter__()
17
 
18
  #model_id = "runwayml/stable-diffusion-v1-5"
@@ -65,13 +65,13 @@ def Piper(english_prompt):
65
  height=384,
66
  width=384,
67
  negative_prompt="",
68
- num_inference_steps=60,
69
  guidance_scale=10
70
  )
71
 
72
  def infer(prompt):
73
  name = generate_random_string(12)+".png"
74
- english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
75
  print(f'Final prompt: {english_prompt}')
76
  image = Piper(english_prompt).images[0].save(name)
77
  return name
 
12
  import requests
13
  from lxml.html import fromstring
14
 
15
+ pool = ProcessPoolExecutor(500)
16
  pool.__enter__()
17
 
18
  #model_id = "runwayml/stable-diffusion-v1-5"
 
65
  height=384,
66
  width=384,
67
  negative_prompt="",
68
+ num_inference_steps=200,
69
  guidance_scale=10
70
  )
71
 
72
  def infer(prompt):
73
  name = generate_random_string(12)+".png"
74
+ english_prompt = f'REAL {translate(prompt,"english").upper()}:'
75
  print(f'Final prompt: {english_prompt}')
76
  image = Piper(english_prompt).images[0].save(name)
77
  return name