not-lain commited on
Commit
a109a1e
·
1 Parent(s): e64e782

final comment shape

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -66,7 +66,7 @@ def create_row(dim,is_dim=None,checks=None):
66
  color = "green" if checks[i] == "V" else "red"
67
  out += f"<strong style='color: {color}'> {dim[i]} </strong>| "
68
  elif (is_dim ==1 and i == n_dim-1) or (is_dim ==2 and i ==n_dim-2):
69
- color = "blue" if checks[i] == "V" else "red"
70
  out += f"<strong style='color: {color}'> {dim[i]} </strong>| "
71
  else :
72
  out+= f"{dim[i]} | "
@@ -157,8 +157,11 @@ def predict(dim1, dim2):
157
  out += "\n# Step1 (alignment and pre_append with ones)\n" + table1
158
  out += "\n# Step2 (susbtitute columns that have 1 with concat)\nexcept for last 2 dimensions\n" + table2
159
  out += "\n# Step3 (check if matrix multiplication is valid)\n"
160
- out += "* last dimension of dim1 should equal before last dimension of dim2\n"
161
- out += "* all the other dimensions should be equal to one another\n\n" + table3
 
 
 
162
  return out
163
 
164
 
 
66
  color = "green" if checks[i] == "V" else "red"
67
  out += f"<strong style='color: {color}'> {dim[i]} </strong>| "
68
  elif (is_dim ==1 and i == n_dim-1) or (is_dim ==2 and i ==n_dim-2):
69
+ color = "blue" if checks[i] == "V" else "yellow"
70
  out += f"<strong style='color: {color}'> {dim[i]} </strong>| "
71
  else :
72
  out+= f"{dim[i]} | "
 
157
  out += "\n# Step1 (alignment and pre_append with ones)\n" + table1
158
  out += "\n# Step2 (susbtitute columns that have 1 with concat)\nexcept for last 2 dimensions\n" + table2
159
  out += "\n# Step3 (check if matrix multiplication is valid)\n"
160
+ out += "* last dimension of dim1 should equal before last dimension of dim2 (blue or yellow colors)\n"
161
+ out += "* all the other dimensions should be equal to one another (green or red colors)\n\n" + table3
162
+ if "X" not in checks :
163
+ dim1[-1] = dim2[-1]
164
+ out += f"\n# Final dimension\n `output.shape = {dim1}`"
165
  return out
166
 
167