freealise commited on
Commit
022388b
1 Parent(s): d73fd83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -970,7 +970,7 @@ with gr.Blocks(css=css, js=js) as demo:
970
  for (var j = i-parseInt(this.value/2); j <= i+parseInt(this.value/2); j++) {
971
  if (pts_a[j]) {
972
  avg += parseInt(pts_a[j]);
973
- } else {
974
  div--;
975
  }
976
  }
 
970
  for (var j = i-parseInt(this.value/2); j <= i+parseInt(this.value/2); j++) {
971
  if (pts_a[j]) {
972
  avg += parseInt(pts_a[j]);
973
+ } else if (div > 1) {
974
  div--;
975
  }
976
  }