Spaces:
Running
Running
import gradio as gr | |
from huggingface_hub import hf_hub_download | |
import fasttext | |
model = fasttext.load_model(hf_hub_download("NbAiLab/nb-nordic-lid", "model.bin")) | |
def identify(text): | |
return model.predict(text) | |
iface = gr.Interface(fn=identify, inputs="text", outputs="text") | |
iface.launch() |