Spaces:
Running
Running
File size: 297 Bytes
cbd7b15 |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |