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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,9 +15,9 @@ def chat(refrence: str, passage: str) -> str:
15
  """
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(output)
19
- output_texts = output[0]['generated_output'][0]
20
- output = outputs[0].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;'>")
23
  output = output.replace("</delete>", "</span>")
 
15
  """
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;'>")
23
  output = output.replace("</delete>", "</span>")