ifire commited on
Commit
38476d8
1 Parent(s): 2a9f449

Clean numbers.

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -99,8 +99,9 @@ def prompt_to_layout(user_prompt, intensity, fpath=None):
99
  for xy in coord:
100
  numbers = xy.split(',')
101
  for num in numbers:
102
- if num.isdigit():
103
- temp.append(int(num)/14.2)
 
104
  num_coords.append(temp)
105
 
106
  new_spaces = []
 
99
  for xy in coord:
100
  numbers = xy.split(',')
101
  for num in numbers:
102
+ clean_num = re.sub(r'^\D*|\D*$', '', num)
103
+ if clean_num.isdigit():
104
+ temp.append(int(clean_num)/14.2)
105
  num_coords.append(temp)
106
 
107
  new_spaces = []