added return in check extension
Browse files- main_noweb.py +28 -6
main_noweb.py
CHANGED
@@ -219,6 +219,19 @@ print("Angle is: ", angle)
|
|
219 |
|
220 |
"""
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
block = gr.Blocks()
|
223 |
|
224 |
with block:
|
@@ -279,15 +292,24 @@ with block:
|
|
279 |
jsonoutput = gr.File(file_types=[".json"])
|
280 |
gr.Markdown("""There are multiple ways to interact with these keypoints.
|
281 |
\n The example below shows how you can calulate the angle on the elbow for example.
|
282 |
-
\n
|
283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
gr.Code(
|
285 |
value=code_example,
|
286 |
language="python",
|
287 |
interactive=False,
|
288 |
show_label=False,
|
289 |
)
|
290 |
-
|
|
|
291 |
|
292 |
|
293 |
with gr.Tab("General information"):
|
@@ -326,9 +348,9 @@ with block:
|
|
326 |
16: Right Ankle ```
|
327 |
|
328 |
\n Below, you can see a visualization of the poses of the 2d, 3d and hand keypoint locations: """)
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
|
333 |
|
334 |
|
|
|
219 |
|
220 |
"""
|
221 |
|
222 |
+
venv_example = """
|
223 |
+
# Create a virtual environment
|
224 |
+
python -m venv ".bstad_env"
|
225 |
+
# Activate the environment
|
226 |
+
.bstad_env\Scripts\Activate
|
227 |
+
# Install numpy and json
|
228 |
+
pip install numpy
|
229 |
+
pip install json
|
230 |
+
|
231 |
+
# Run the code from the commandline
|
232 |
+
python \Path\To\Script.py
|
233 |
+
"""
|
234 |
+
|
235 |
block = gr.Blocks()
|
236 |
|
237 |
with block:
|
|
|
292 |
jsonoutput = gr.File(file_types=[".json"])
|
293 |
gr.Markdown("""There are multiple ways to interact with these keypoints.
|
294 |
\n The example below shows how you can calulate the angle on the elbow for example.
|
295 |
+
\n If you choose to run the code, start by installing the packages json and numpy. You can do that by running the following commands in Poweshell or another commandline/terminal.""")
|
296 |
+
|
297 |
+
gr.Code(value=venv_example,
|
298 |
+
language="python",
|
299 |
+
interactive=False,
|
300 |
+
show_label=False,
|
301 |
+
)
|
302 |
+
|
303 |
+
gr.Markdown("""\n Then copy the next code segment into your own preferred interpreter and experiment with the keypoint file.
|
304 |
+
""")
|
305 |
gr.Code(
|
306 |
value=code_example,
|
307 |
language="python",
|
308 |
interactive=False,
|
309 |
show_label=False,
|
310 |
)
|
311 |
+
|
312 |
+
gr.Markdown("""The complete overview of the keypoint indices can be seen in the tab 'General information'. """)
|
313 |
|
314 |
|
315 |
with gr.Tab("General information"):
|
|
|
348 |
16: Right Ankle ```
|
349 |
|
350 |
\n Below, you can see a visualization of the poses of the 2d, 3d and hand keypoint locations: """)
|
351 |
+
with gr.Row():
|
352 |
+
gr.Image("./cocoposes.png", width="160")
|
353 |
+
gr.Image("./cocohand.png", width="160")
|
354 |
|
355 |
|
356 |
|