File size: 740 Bytes
1fa9769
808add1
122de3c
4b1d8f8
808add1
 
4b1d8f8
808add1
 
 
 
4b1d8f8
122de3c
4b1d8f8
122de3c
4b1d8f8
808add1
 
 
 
 
 
 
 
4b1d8f8
808add1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr
import tensorflow as tf
import numpy as np

# Load your sign language prediction model
model = tf.keras.models.load_model(r"C:\Users\Jeffery.st\Desktop\st.Jeffery00\mega\model.h5")

# Define the prediction function
def predict_sign_language(image):
    # Run inference using the model
    prediction = model.predict(np.expand_dims(image, axis=0))

    # ... (post-processing if required)

    return prediction

# Define the webcam input component
webcam_input = gr.inputs.Image(source="webcam")

# Define the output component
label_output = gr.outputs.Label()

# Create the Gradio interface
iface = gr.Interface(fn=predict_sign_language, inputs=webcam_input, outputs=label_output)

# Launch the interface
iface.launch()