1inkusFace commited on
Commit
ddec57b
·
verified ·
1 Parent(s): 79eef31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -87,14 +87,14 @@ def upload_to_gcs(image_bytes, filename):
87
  print("⚠️ GCS client not initialized. Skipping upload.")
88
  return
89
  try:
90
- print(f"--> Starting GCS upload for {}...")
91
  bucket = gcs_client.bucket(GCS_BUCKET_NAME)
92
- blob = bucket.blob(f"stablediff/{}")
93
  # The image_bytes is already a bytes object, so we can upload it directly
94
  blob.upload_from_string(image_bytes, content_type='image/jpeg')
95
- print(f"✅ Successfully uploaded {} to GCS.")
96
  except Exception as e:
97
- print(f"❌ An error occurred during GCS upload for {}: {}")
98
 
99
 
100
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
 
87
  print("⚠️ GCS client not initialized. Skipping upload.")
88
  return
89
  try:
90
+ print(f"--> Starting GCS upload for {filename}...")
91
  bucket = gcs_client.bucket(GCS_BUCKET_NAME)
92
+ blob = bucket.blob(f"stablediff/{filename}")
93
  # The image_bytes is already a bytes object, so we can upload it directly
94
  blob.upload_from_string(image_bytes, content_type='image/jpeg')
95
+ print(f"✅ Successfully uploaded {filename} to GCS.")
96
  except Exception as e:
97
+ print(f"❌ An error occurred during GCS upload for {filename}: {e}")
98
 
99
 
100
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")