Spaces:
Runtime error
Runtime error
Create app.py
Browse files123456789101112import gradio as grfrom huggingface_hub import hf_hub_downloadimport 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()app.pyAdded+12