MaxReimann commited on
Commit
34a420d
1 Parent(s): 3e4890f

Update tasks.py

Browse files
Files changed (1) hide show
  1. tasks.py +2 -2
tasks.py CHANGED
@@ -108,7 +108,7 @@ def optimize_on_server(content, style, result_image_placeholder):
108
  style = pil_resize_long_edge_to(style, 1024)
109
  style.save(style_path)
110
  files = {'style-image': open(style_path, "rb"), "content-image": open(content_path, "rb")}
111
- print("start-optimizing")
112
  url = WORKER_URL + "/upload"
113
  task_id_res = requests.post(url, files=files)
114
  if task_id_res.status_code != 200:
@@ -140,4 +140,4 @@ def optimize_params(effect, preset, content, style, result_image_placeholder):
140
  write_video=False, base_dir=base_dir,
141
  iter_callback=lambda i: progress_bar.progress(
142
  float(i) / ST_CONFIG["n_iterations"]))
143
- st.session_state["effect_input"], st.session_state["result_vp"] = content_img_cuda.detach(), vp.cuda().detach()
 
108
  style = pil_resize_long_edge_to(style, 1024)
109
  style.save(style_path)
110
  files = {'style-image': open(style_path, "rb"), "content-image": open(content_path, "rb")}
111
+ print("start-optimizing. Time: ", datetime.datetime.now())
112
  url = WORKER_URL + "/upload"
113
  task_id_res = requests.post(url, files=files)
114
  if task_id_res.status_code != 200:
 
140
  write_video=False, base_dir=base_dir,
141
  iter_callback=lambda i: progress_bar.progress(
142
  float(i) / ST_CONFIG["n_iterations"]))
143
+ st.session_state["effect_input"], st.session_state["result_vp"] = content_img_cuda.detach(), vp.cuda().detach()