5m4ck3r commited on
Commit
34651a5
·
verified ·
1 Parent(s): 70a73a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ def chat(refrence: str, passage: str) -> str:
16
  text = f"Read the following references:\n{refrence}\nPlease identify all the errors in the following text using the information in the references provided and suggest edits if necessary:\n[Text] {passage}\n[Edited] "
17
  outputs = pipe(text)
18
  print(outputs)
19
- output = outputs[0]['generated_output'][0]
20
  output = output.replace("<mark>", "<span style='color: green; font-weight: bold;'> ")
21
  output = output.replace("</mark>", " </span>")
22
  output = output.replace("<delete>", "<span style='color: red; text-decoration: line-through;'>")
 
16
  text = f"Read the following references:\n{refrence}\nPlease identify all the errors in the following text using the information in the references provided and suggest edits if necessary:\n[Text] {passage}\n[Edited] "
17
  outputs = pipe(text)
18
  print(outputs)
19
+ output = outputs[0]['generated_text']
20
  output = output.replace("<mark>", "<span style='color: green; font-weight: bold;'> ")
21
  output = output.replace("</mark>", " </span>")
22
  output = output.replace("<delete>", "<span style='color: red; text-decoration: line-through;'>")