BryanW commited on
Commit
4608244
·
verified ·
1 Parent(s): 6cd3a4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -51,6 +51,7 @@ def get_transform(resolution):
51
  @spaces.GPU
52
  def image_to_text(image, prompt, seed=42, steps=64, cfg=9.0):
53
  try:
 
54
  transform = get_transform(resolution)
55
 
56
  if image is not None:
@@ -81,6 +82,7 @@ def image_to_text(image, prompt, seed=42, steps=64, cfg=9.0):
81
  @spaces.GPU
82
  def text_to_image(prompt, negative_prompt, num_images=1, seed=42, steps=64, cfg=9.0):
83
  try:
 
84
  negative_prompt = negative_prompt or "worst quality, low quality, low res, blurry, distortion, watermark, logo, signature, text, jpeg artifacts, signature, sketch, duplicate, ugly, identifying mark"
85
 
86
  output = pipe(
 
51
  @spaces.GPU
52
  def image_to_text(image, prompt, seed=42, steps=64, cfg=9.0):
53
  try:
54
+ resolution = 1024
55
  transform = get_transform(resolution)
56
 
57
  if image is not None:
 
82
  @spaces.GPU
83
  def text_to_image(prompt, negative_prompt, num_images=1, seed=42, steps=64, cfg=9.0):
84
  try:
85
+ resolution = 1024
86
  negative_prompt = negative_prompt or "worst quality, low quality, low res, blurry, distortion, watermark, logo, signature, text, jpeg artifacts, signature, sketch, duplicate, ugly, identifying mark"
87
 
88
  output = pipe(