Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
from PIL import Image | |
import io | |
# Load your sign language detection model | |
model = pipeline("image-classification", model="RavenOnur/Sign-Language") | |
def classify_image(image): | |
# Ensure the image is in RGB format | |
image = image.convert("RGB") | |
results = model(image) | |
return {result['label']: result['score'] for result in results} | |
# Define the Gradio interface | |
interface = gr.Interface(fn=classify_image, inputs=gr.Image(type="pil"), outputs="label") | |
interface.launch(show_error=True) | |