File size: 546 Bytes
dece60c
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from transformers import pipeline


model = pipeline("text2text-generation", model="asimokby/Turkish-GPT-GEC-v0")

def generate_text(prompt):
    return model(prompt, max_length=500)[0]['generated_text']

description = """A demo for our Turkish GEC model. Paper: https://arxiv.org/pdf/2405.15320"""
article = "Find more models and datasets related to Turkish GEC 🚀: https://github.com/asimokby (Paper: https://arxiv.org/pdf/2405.15320)"

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