mohamedsaeed823
commited on
Commit
•
48cbe41
1
Parent(s):
4fa20fc
Update app.py
Browse files
app.py
CHANGED
@@ -55,12 +55,12 @@ def recognize_gesture(image):
|
|
55 |
top_gesture = recognition_result.gestures[0][0]
|
56 |
|
57 |
# Return the gesture label and score
|
58 |
-
return
|
59 |
|
60 |
iface = gr.Interface(
|
61 |
fn=recognize_gesture,
|
62 |
inputs=gr.Image(sources=["upload","clipboard"]), # Input type: image
|
63 |
-
outputs=
|
64 |
title="Arabic Sign Language Character Recognition",
|
65 |
description="Upload an image to recognize the character",
|
66 |
)
|
|
|
55 |
top_gesture = recognition_result.gestures[0][0]
|
56 |
|
57 |
# Return the gesture label and score
|
58 |
+
return dict(zip(eng_ara_mapping[top_gesture.category_name], {top_gesture.score:.2f})
|
59 |
|
60 |
iface = gr.Interface(
|
61 |
fn=recognize_gesture,
|
62 |
inputs=gr.Image(sources=["upload","clipboard"]), # Input type: image
|
63 |
+
outputs=gr.Label(num_top_classes=4), # Output type: label
|
64 |
title="Arabic Sign Language Character Recognition",
|
65 |
description="Upload an image to recognize the character",
|
66 |
)
|