jiuface commited on
Commit
9401d3b
1 Parent(s): df9f472

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -79,8 +79,8 @@ def upload_image_to_r2(image, account_id, access_key, secret_key, bucket_name):
79
  aws_secret_access_key=secret_key
80
  )
81
 
82
- current_time = datetime.now().strftime("%Y/%m/%d/%H%M%S")
83
- image_file = f"generated_images/{current_time}_{random.randint(0, MAX_SEED)}.png"
84
  buffer = BytesIO()
85
  image.save(buffer, "PNG")
86
  buffer.seek(0)
@@ -108,7 +108,6 @@ def generate_random_4_digit_string():
108
  return ''.join(random.choices(string.digits, k=4))
109
 
110
  @spaces.GPU(duration=120)
111
-
112
  def run_lora(prompt, image_url, lora_strings_json, image_strength, cfg_scale, steps, randomize_seed, seed, width, height, upload_to_r2, account_id, access_key, secret_key, bucket, progress=gr.Progress(track_tqdm=True)):
113
  print("run_lora", prompt, lora_strings_json, cfg_scale, steps, width, height)
114
  gr.Info("Starting process")
 
79
  aws_secret_access_key=secret_key
80
  )
81
 
82
+ current_time = datetime.now().strftime("%Y/%m/%d/%H/%M/%S")
83
+ image_file = f"generated_images/{current_time}/{random.randint(0, MAX_SEED)}.png"
84
  buffer = BytesIO()
85
  image.save(buffer, "PNG")
86
  buffer.seek(0)
 
108
  return ''.join(random.choices(string.digits, k=4))
109
 
110
  @spaces.GPU(duration=120)
 
111
  def run_lora(prompt, image_url, lora_strings_json, image_strength, cfg_scale, steps, randomize_seed, seed, width, height, upload_to_r2, account_id, access_key, secret_key, bucket, progress=gr.Progress(track_tqdm=True)):
112
  print("run_lora", prompt, lora_strings_json, cfg_scale, steps, width, height)
113
  gr.Info("Starting process")