Update app.py
Browse files
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]['
|
| 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;'>")
|