ifire commited on
Commit
52220ab
·
1 Parent(s): 8ea6b53

Less breakage.

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -122,8 +122,14 @@ 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
- scaled_poly = scale(Polygon(np.array(poly, dtype=int)), xfact=2, yfact=2, origin=(0,0))
126
- geom.append(scaled_poly)
 
 
 
 
 
 
127
  colors = []
128
  for space in spaces:
129
  for key in housegan_labels.keys():
 
122
  polygons.append([point.split(',') for point in coord])
123
  geom = []
124
  for poly in polygons:
125
+ # Filter out non-numeric values from poly.
126
+ filtered_poly = []
127
+ for value in poly:
128
+ if value.isdigit():
129
+ filtered_poly.append(value)
130
+ if poly:
131
+ scaled_poly = scale(Polygon(np.array(poly, dtype=int)), xfact=2, yfact=2, origin=(0,0))
132
+ geom.append(scaled_poly)
133
  colors = []
134
  for space in spaces:
135
  for key in housegan_labels.keys():