Suchinthana commited on
Commit
f2b94ee
1 Parent(s): 5cc1d4c
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,13 +8,13 @@ generator3 = pipeline(model='Suchinthana/MT5-Sinhala-Wikigen-Experimental', toke
8
 
9
  # Define the function for Gradio to use
10
  def generate_sinhala_text(prompt):
11
- generated_text = generator3(prompt, do_sample=True, max_length=50)[0]['generated_text']
12
  return generated_text
13
 
14
  iface = gr.Interface(
15
  fn=generate_sinhala_text,
16
- inputs=gr.inputs.Textbox(),
17
- outputs=gr.outputs.Textbox()
18
  )
19
 
20
  iface.launch()
 
8
 
9
  # Define the function for Gradio to use
10
  def generate_sinhala_text(prompt):
11
+ generated_text = generator3("writeWiki:"+prompt, do_sample=True, max_length=50)[0]['generated_text']
12
  return generated_text
13
 
14
  iface = gr.Interface(
15
  fn=generate_sinhala_text,
16
+ inputs=gr.Textbox(label="Topic Here"),
17
+ outputs=gr.Textbox(lines=3, placeholder="Result Comes Here...", label="Output"),
18
  )
19
 
20
  iface.launch()