Spaces:
Build error
Build error
File size: 364 Bytes
90f85d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import re
def wrap_html_code(text):
pattern = r"<.*?>"
matches = re.findall(pattern, text)
if len(matches) > 0:
return f"```{text}```"
else:
return text
def get_full_text(response):
output = ""
for resp in response:
if resp.token.special:
continue
output += resp.token.text
return output
|