Spaces:
Runtime error
Runtime error
import gradio as gr | |
import fasttext | |
import fasttext.util | |
ft = fasttext.load_model('cc.en.100.bin') | |
def getVectors(fname): | |
data = {} | |
data[tokens[0]] = ft.get_nearest_neighbors(fname) | |
return data | |
interface = gr.Interface(fn = getVectors, | |
inputs = "text", | |
outputs = ['text'], | |
title = 'get vectors', | |
description = 'get vectors for search') | |
interface.launch(inline = False) |