Spaces:
Runtime error
Runtime error
File size: 378 Bytes
af72730 cc96f64 af72730 cc96f64 af72730 c1ba3bc adff43b c1ba3bc cc96f64 af72730 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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() |