File size: 279 Bytes
af72730
cc96f64
af72730
cc96f64
 
af72730
cc96f64
 
 
 
 
af72730
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr
import pymorphy3

morph = pymorphy3.MorphAnalyzer()
morph = pymorphy3.MorphAnalyzer(lang='ru')

def infinitive(word):
    p = morph.parse(str(word))[0]
    return p.normal_form

iface = gr.Interface(fn=infinitive, inputs="text", outputs="text")
iface.launch()