Shaltiel commited on
Commit
8bb438d
1 Parent(s): 96c017e

Added display for angle tokens

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -49,7 +49,8 @@ def model_chat(query: Optional[str], history: Optional[History]) -> Generator[Tu
49
  full_response = ''
50
  for completion in gen:
51
  text = completion.choices[0].delta.content
52
- full_response += text or ''
 
53
  yield full_response
54
 
55
  with gr.Blocks(css='''
 
49
  full_response = ''
50
  for completion in gen:
51
  text = completion.choices[0].delta.content
52
+ if text:
53
+ full_response += text.replace('<', '&lt;').replace('>', '&gt;') or ''
54
  yield full_response
55
 
56
  with gr.Blocks(css='''