Spaces:
Runtime error
Runtime error
Download app.py from Artificialvira/signlanguage: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/spaces/Artificialvira/signlanguage/resolve/main/app.py
- Command line
-
hf download hf://spaces/Artificialvira/signlanguage/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Artificialvira/signlanguage/resolve/main/app.py
554 Bytes
| 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) | |