skkk commited on
Commit
28bc8db
1 Parent(s): a8facf5
Files changed (1) hide show
  1. Rodin.py +3 -0
Rodin.py CHANGED
@@ -125,12 +125,15 @@ def load_image(img_path):
125
  class Generator:
126
  def __init__(self, user_id, password) -> None:
127
  _, self.token = login(user_id, password)
 
 
128
  self.task_uuid = None
129
 
130
  def preprocess(self, prompt, image_path, cache_image_base64, task_uuid=""):
131
  if cache_image_base64 and prompt and task_uuid != "":
132
  return prompt, cache_image_base64
133
  print("Preprocessing image...")
 
134
 
135
  image_file = load_image(image_path)
136
  if prompt and task_uuid:
 
125
  class Generator:
126
  def __init__(self, user_id, password) -> None:
127
  _, self.token = login(user_id, password)
128
+ self.user_id = user_id
129
+ self.password = password
130
  self.task_uuid = None
131
 
132
  def preprocess(self, prompt, image_path, cache_image_base64, task_uuid=""):
133
  if cache_image_base64 and prompt and task_uuid != "":
134
  return prompt, cache_image_base64
135
  print("Preprocessing image...")
136
+ _, self.token = login(self.user_id, self.password)
137
 
138
  image_file = load_image(image_path)
139
  if prompt and task_uuid: