Spaces:
Runtime error
Runtime error
import gradio as gr | |
import pymorphy3 | |
morph = pymorphy3.MorphAnalyzer() | |
morph = pymorphy3.MorphAnalyzer(lang='ru') | |
def infinitive(text): | |
words = text.split() | |
newstr = "" | |
for word in words: | |
p = morph.parse(str(word))[0] | |
newstr += f"{p.normal_form} " | |
return newstr | |
iface = gr.Interface(fn=infinitive, inputs="text", outputs="text") | |
iface.launch() |