File size: 349 Bytes
ef68a63
 
 
 
 
 
 
 
ebd80bf
ef68a63
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use a pipeline as a high-level helper
from transformers import pipeline
import gradio as gr


pipe = pipeline("text2text-generation", model="basharalrfooh/Fine-Tashkeel")

def diacratize_text(text):
    return pipe(text)['generated_text']

demo = gr.Interface(
    fn=diacratize_text,
    inputs=["text"],
    outputs=["text"],
)

demo.launch()