Asım Ersoy commited on
Commit
2ec4c62
1 Parent(s): 717e587

update styles

Browse files
Files changed (1) hide show
  1. app.py +10 -3
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
- 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()
 
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()