brogelio commited on
Commit
4b1fa52
1 Parent(s): 22a04de

Edited Interface

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,7 +57,7 @@ def find_hands(brain, img):
57
  def is_drawing(index, thumb): # proximity function with arbitrary threshold
58
  npindex = np.array((index[0], index[1]))
59
  npthumb = np.array((thumb[0], thumb[1]))
60
- if np.linalg.norm(npindex - npthumb) < 13:
61
  return True
62
  else:
63
  return False
@@ -200,7 +200,7 @@ def show(video, dominant_hand, hex_color): # main
200
  return 'any.webm'
201
 
202
  title = 'Air Draw'
203
- desc = 'A mediapipe hands wrapper for drawing in the air. Position your fingers in a "drawing" form to draw, and open up your hand to lift the "pen" from the "paper". Use a "thumbs up gesture to clear the drawing paper".'
204
  iface = gr.Interface(
205
  fn=show,
206
  inputs=[
 
57
  def is_drawing(index, thumb): # proximity function with arbitrary threshold
58
  npindex = np.array((index[0], index[1]))
59
  npthumb = np.array((thumb[0], thumb[1]))
60
+ if np.linalg.norm(npindex - npthumb) < 20:
61
  return True
62
  else:
63
  return False
 
200
  return 'any.webm'
201
 
202
  title = 'Air Draw'
203
+ desc = 'A mediapipe hands wrapper for drawing in the air. Position your fingers in a "drawing" form to draw, and open up your hand to lift the "pen" from the "paper". Use a "thumbs up" gesture to clear the drawing paper.'
204
  iface = gr.Interface(
205
  fn=show,
206
  inputs=[