not-lain commited on
Commit
a951e4b
1 Parent(s): 7ff9ff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -46,9 +46,9 @@ def generate_example(dim1: list, dim2: list):
46
  return dim1, dim2, code
47
 
48
 
49
- def sanitize_dimention(dim):
50
  if dim is None:
51
- gr.Error("one of the dimentions is empty, please fill it")
52
  if "[" in dim:
53
  dim = dim.replace("[", "")
54
  if "]" in dim:
@@ -163,8 +163,8 @@ def substitute_ones_with_concat(dim1, dim2, version=1):
163
 
164
 
165
  def predict(dim1, dim2):
166
- dim1 = sanitize_dimention(dim1)
167
- dim2 = sanitize_dimention(dim2)
168
  n1, n2 = len(dim1), len(dim2)
169
  dim1, dim2, out = generate_example(dim1, dim2)
170
  # TODO
 
46
  return dim1, dim2, code
47
 
48
 
49
+ def sanitize_dimension(dim):
50
  if dim is None:
51
+ gr.Error("one of the dimensions is empty, please fill it")
52
  if "[" in dim:
53
  dim = dim.replace("[", "")
54
  if "]" in dim:
 
163
 
164
 
165
  def predict(dim1, dim2):
166
+ dim1 = sanitize_dimension(dim1)
167
+ dim2 = sanitize_dimension(dim2)
168
  n1, n2 = len(dim1), len(dim2)
169
  dim1, dim2, out = generate_example(dim1, dim2)
170
  # TODO