Spaces:
Runtime error
Runtime error
Added app
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from ukrainian_accentor_transformer import Accentor
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
accentor = Accentor()
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
def accentification(sentence):
|
11 |
+
accented_sentence = accentor(sentence)
|
12 |
+
return accented_sentence
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
iface = gr.Interface(
|
17 |
+
fn=accentification,
|
18 |
+
inputs=gr.inputs.Textbox(label="Input"),
|
19 |
+
outputs=gr.outputs.Textbox(label="Stressed"),
|
20 |
+
title="Ukrainian Accentor Transformer",
|
21 |
+
)
|
22 |
+
iface.launch()
|