xu3kev commited on
Commit
9768ed0
1 Parent(s): ce43b93
Files changed (2) hide show
  1. app.py +3 -1
  2. myturtle_cv.py +1 -1
app.py CHANGED
@@ -417,11 +417,13 @@ def img_to_code_img(sketchpad_img):
417
  # return generated_grid_img[0]
418
 
419
  folder = create_tmp_folder()
 
420
  for i in range(len(gif_results)):
421
  if gif_results[i]:
422
  with open(f"{folder}/img{i}.gif", "wb") as f:
423
  f.write(gif_results[i])
424
- return [f"{folder}/img{i}.gif" for i in range(len(gif_results))]
 
425
 
426
 
427
  def main():
 
417
  # return generated_grid_img[0]
418
 
419
  folder = create_tmp_folder()
420
+ img_names = []
421
  for i in range(len(gif_results)):
422
  if gif_results[i]:
423
  with open(f"{folder}/img{i}.gif", "wb") as f:
424
  f.write(gif_results[i])
425
+ img_names.append(f"img{i}.gif")
426
+ return [f"{folder}/{name}" for name in img_names]
427
 
428
 
429
  def main():
myturtle_cv.py CHANGED
@@ -68,7 +68,7 @@ ROTATE_SPEED = 30
68
  FPS = 24
69
 
70
  class Turtle:
71
- def __init__(self, canvas_size=(2000, 2000)):
72
  self.x = canvas_size[0] // 2
73
  self.y = canvas_size[1] // 2
74
  self.heading = 0
 
68
  FPS = 24
69
 
70
  class Turtle:
71
+ def __init__(self, canvas_size=(1000, 1000)):
72
  self.x = canvas_size[0] // 2
73
  self.y = canvas_size[1] // 2
74
  self.heading = 0