Spaces:
Runtime error
Runtime error
Download app.py from Alghamdi7080/Dialect_classification: direct link, hf CLI and curl.
- Browser
- Download file 255 Bytes
-
https://huggingface.co/spaces/Alghamdi7080/Dialect_classification/resolve/main/app.py
- Command line
-
hf download hf://spaces/Alghamdi7080/Dialect_classification/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Alghamdi7080/Dialect_classification/resolve/main/app.py
255 Bytes
| import pickle | |
| import gradio as gr | |
| def dialect_pred(text): | |
| loaded_model = pickle.load(open('./dialect_model.sav', 'rb')) | |
| return loaded_model.predict([text])[0] | |
| demo = gr.Interface(fn=dialect_pred, inputs="text",outputs= ["text"]) | |
| demo.launch() |