Commit
•
56364c9
1
Parent(s):
63492c9
Update app.py
Browse files
app.py
CHANGED
@@ -55,15 +55,14 @@ def recognize_gesture(image):
|
|
55 |
top_gesture = recognition_result.gestures[0][0]
|
56 |
|
57 |
# Return the gesture label and score
|
58 |
-
return
|
59 |
-
|
60 |
|
61 |
iface = gr.Interface(
|
62 |
fn=recognize_gesture,
|
63 |
-
inputs=
|
64 |
-
outputs=
|
65 |
title="Arabic Sign Language Character Recognition",
|
66 |
-
description="Upload an image to recognize the
|
67 |
)
|
68 |
|
69 |
-
iface.launch(
|
|
|
55 |
top_gesture = recognition_result.gestures[0][0]
|
56 |
|
57 |
# Return the gesture label and score
|
58 |
+
return f"Gesture recognized: {eng_ara_mapping[top_gesture.category_name]} ({top_gesture.score:.2f})"
|
|
|
59 |
|
60 |
iface = gr.Interface(
|
61 |
fn=recognize_gesture,
|
62 |
+
inputs=["image"], # Input type: image
|
63 |
+
outputs="text", # Output type: text
|
64 |
title="Arabic Sign Language Character Recognition",
|
65 |
+
description="Upload an image to recognize the gesture",
|
66 |
)
|
67 |
|
68 |
+
iface.launch() # Launch the interface in a web browser
|