skkk commited on
Commit
a8facf5
1 Parent(s): ab026aa

add some log

Browse files
Files changed (1) hide show
  1. Rodin.py +2 -0
Rodin.py CHANGED
@@ -137,6 +137,7 @@ class Generator:
137
  preprocess_response = rodin_preprocess_image(generate_prompt=False, image=image_file, name="images.png", token=self.token)
138
  else:
139
  preprocess_response = rodin_preprocess_image(generate_prompt=True, image=image_file, name="images.png", token=self.token)
 
140
  if 'error' in preprocess_response:
141
  print("Error in image preprocessing:", preprocess_response['error'])
142
  else:
@@ -146,6 +147,7 @@ class Generator:
146
  processed_image = "data:image/png;base64," + preprocess_response.get('processed_image', None)
147
  except Exception as e:
148
  print(preprocess_response)
 
149
 
150
  return prompt, processed_image
151
 
 
137
  preprocess_response = rodin_preprocess_image(generate_prompt=False, image=image_file, name="images.png", token=self.token)
138
  else:
139
  preprocess_response = rodin_preprocess_image(generate_prompt=True, image=image_file, name="images.png", token=self.token)
140
+
141
  if 'error' in preprocess_response:
142
  print("Error in image preprocessing:", preprocess_response['error'])
143
  else:
 
147
  processed_image = "data:image/png;base64," + preprocess_response.get('processed_image', None)
148
  except Exception as e:
149
  print(preprocess_response)
150
+ raise e
151
 
152
  return prompt, processed_image
153