pip64 commited on
Commit
cc96f64
·
1 Parent(s): af72730
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
7
  iface.launch()
 
1
  import gradio as gr
2
+ import pymorphy3
3
 
4
+ morph = pymorphy3.MorphAnalyzer()
5
+ morph = pymorphy3.MorphAnalyzer(lang='ru')
6
 
7
+ def infinitive(word):
8
+ p = morph.parse(str(word))[0]
9
+ return p.normal_form
10
+
11
+ iface = gr.Interface(fn=infinitive, inputs="text", outputs="text")
12
  iface.launch()