versae commited on
Commit
c85bbaa
·
1 Parent(s): 9328f46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ def modernisa(inputs):
9
  lines = [line for line in inputs.strip().split('\n') if line.strip()]
10
  text2text_generator = pipeline("text2text-generation", model=model, tokenizer=tokenizer)
11
  outputs = text2text_generator(lines, max_length=150)
12
- return "\n".join(output["generated_text"] for output in outputs)
13
 
14
  sample = """Otra vez, Don Iuan, me dad,
15
  y otras mil vezes los braços.
@@ -27,5 +27,5 @@ porque el pensamiento creo"""
27
  gr.Interface(
28
  fn=modernisa,
29
  inputs=gr.inputs.Textbox(lines=12, label="Enter Old Spanish", default=sample),
30
- outputs=gr.outputs.Textbox(lines=12, label="Modern Spanish"),
31
  ).launch(inline=False)
 
9
  lines = [line for line in inputs.strip().split('\n') if line.strip()]
10
  text2text_generator = pipeline("text2text-generation", model=model, tokenizer=tokenizer)
11
  outputs = text2text_generator(lines, max_length=150)
12
+ return "<br/>".join(output["generated_text"] for output in outputs)
13
 
14
  sample = """Otra vez, Don Iuan, me dad,
15
  y otras mil vezes los braços.
 
27
  gr.Interface(
28
  fn=modernisa,
29
  inputs=gr.inputs.Textbox(lines=12, label="Enter Old Spanish", default=sample),
30
+ outputs=gr.outputs.HTML(label="Modern Spanish"),
31
  ).launch(inline=False)