Yaron Koresh commited on
Commit
1edf32f
·
verified ·
1 Parent(s): 9b8e50d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -58,18 +58,18 @@ def generate_random_string(length):
58
  characters = string.ascii_letters + string.digits
59
  return ''.join(random.choice(characters) for _ in range(length))
60
 
61
- @spaces.GPU(20)
62
  def infer(prompt):
63
  name = generate_random_string(12)+".png"
64
  english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
65
  print(f'Final prompt: {english_prompt}')
66
  image = pipe(
67
  english_prompt,
68
- height=512,
69
- width=512,
70
  negative_prompt="",
71
- num_inference_steps=40,
72
- guidance_scale=5
73
  ).images[0].save(name)
74
  return name
75
 
 
58
  characters = string.ascii_letters + string.digits
59
  return ''.join(random.choice(characters) for _ in range(length))
60
 
61
+ @spaces.GPU(10)
62
  def infer(prompt):
63
  name = generate_random_string(12)+".png"
64
  english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
65
  print(f'Final prompt: {english_prompt}')
66
  image = pipe(
67
  english_prompt,
68
+ height=384,
69
+ width=384,
70
  negative_prompt="",
71
+ num_inference_steps=60,
72
+ guidance_scale=9
73
  ).images[0].save(name)
74
  return name
75