versae's picture
Create app.py
cbd7b15
raw
history blame
297 Bytes
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()