Asım Ersoy commited on
Commit
dece60c
·
1 Parent(s): 1b005f1

initial commit

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+
5
+ model = pipeline("text2text-generation", model="asimokby/Turkish-GPT-GEC-v0")
6
+
7
+ def generate_text(prompt):
8
+ return model(prompt, max_length=500)[0]['generated_text']
9
+
10
+ description = """A demo for our Turkish GEC model. Paper: https://arxiv.org/pdf/2405.15320"""
11
+ article = "Find more models and datasets related to Turkish GEC 🚀: https://github.com/asimokby (Paper: https://arxiv.org/pdf/2405.15320)"
12
+
13
+ iface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
14
+ iface.launch()