ifire commited on
Commit
286009e
1 Parent(s): d356491

Try again to make the list robust.

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -122,13 +122,11 @@ def prompt_to_layout(user_prompt, intensity, fpath=None):
122
  polygons.append([point.split(',') for point in coord])
123
  geom = []
124
  for poly in polygons:
125
- new_poly = []
126
- for point in poly:
127
- new_poly.append(list(map(int, point)))
128
  if len(new_poly) >= 4:
129
- scaled_poly = scale(Polygon(new_poly), xfact=2, yfact=2, origin=(0,0))
130
- geom.append(scaled_poly)
131
- colors = []
132
  for space in spaces:
133
  for key in housegan_labels.keys():
134
  if key in space:
 
122
  polygons.append([point.split(',') for point in coord])
123
  geom = []
124
  for poly in polygons:
125
+ new_poly = [list(map(int, point)) for point in poly]
 
 
126
  if len(new_poly) >= 4:
127
+ scaled_poly = scale(Polygon(new_poly), xfact=2, yfact=2, origin=(0,0))
128
+ geom.append(scaled_poly)
129
+ colors: List[int] = []
130
  for space in spaces:
131
  for key in housegan_labels.keys():
132
  if key in space: