Spaces:
Sleeping
Sleeping
Asım Ersoy
commited on
Commit
·
2ec4c62
1
Parent(s):
717e587
update styles
Browse files
app.py
CHANGED
|
@@ -7,8 +7,15 @@ model = pipeline("text2text-generation", model="asimokby/Turkish-GPT-GEC-v0")
|
|
| 7 |
def generate_text(prompt):
|
| 8 |
return model(prompt, max_length=500)[0]['generated_text']
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
iface.launch()
|
|
|
|
| 7 |
def generate_text(prompt):
|
| 8 |
return model(prompt, max_length=500)[0]['generated_text']
|
| 9 |
|
| 10 |
+
# Description and title
|
| 11 |
+
description = """This application is a demo for our Turkish Grammar Error Correction model.
|
| 12 |
+
Please enter text in Turkish, and it will provide you with corrected output.
|
| 13 |
+
For more information, check out the paper: [Paper Link](https://arxiv.org/pdf/2405.15320)"""
|
| 14 |
|
| 15 |
+
title = "Turkish Grammar Assistant"
|
| 16 |
+
|
| 17 |
+
input_box = gr.Textbox(lines=20, label="Input Text") # Increase lines for input
|
| 18 |
+
output_box = gr.Textbox(lines=20, label="Output Text", interactive=True) # Increase lines for output
|
| 19 |
+
|
| 20 |
+
iface = gr.Interface(fn=generate_text, inputs=input_box, outputs=output_box, title="Turkish Grammar Assistant", description=description)
|
| 21 |
iface.launch()
|