Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ import mediapipe as mp
|
|
11 |
import os
|
12 |
import time
|
13 |
|
14 |
-
#
|
15 |
-
|
16 |
|
17 |
# Streamlit settings
|
18 |
st.set_page_config(page_title="Virtual Keyboard", page_icon="🏋️")
|
@@ -66,12 +66,12 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
66 |
|
67 |
for row, key_row in enumerate(keys):
|
68 |
for col, key in enumerate(key_row):
|
69 |
-
x = int(0.03 * w + col * (key_width +
|
70 |
-
y = int(0.03 * h + row * (key_height +
|
71 |
buttonList.append(Button([x, y], key, size=[key_width, key_height]))
|
72 |
|
73 |
# Add special buttons for Backspace and Space
|
74 |
-
buttonList.append(Button([int(0.
|
75 |
buttonList.append(Button([int(0.2 * w), int(0.4 * h)], 'SPACE', size=[int(0.6 * w), key_height]))
|
76 |
|
77 |
# Draw Keyboard Buttons
|
|
|
11 |
import os
|
12 |
import time
|
13 |
|
14 |
+
# Logger Setup
|
15 |
+
logger = logging.getLogger(_name_)
|
16 |
|
17 |
# Streamlit settings
|
18 |
st.set_page_config(page_title="Virtual Keyboard", page_icon="🏋️")
|
|
|
66 |
|
67 |
for row, key_row in enumerate(keys):
|
68 |
for col, key in enumerate(key_row):
|
69 |
+
x = int(0.03 * w + col * (key_width + 10))
|
70 |
+
y = int(0.03 * h + row * (key_height + 10))
|
71 |
buttonList.append(Button([x, y], key, size=[key_width, key_height]))
|
72 |
|
73 |
# Add special buttons for Backspace and Space
|
74 |
+
buttonList.append(Button([int(0.85 * w), int(0.03 * h)], 'BS', size=[int(0.08 * w), key_height]))
|
75 |
buttonList.append(Button([int(0.2 * w), int(0.4 * h)], 'SPACE', size=[int(0.6 * w), key_height]))
|
76 |
|
77 |
# Draw Keyboard Buttons
|