Spaces:
Runtime error
Runtime error
Added escaping for angle bracketts
Browse files
app.py
CHANGED
@@ -44,7 +44,8 @@ def model_chat(query: Optional[str], history: Optional[History]) -> Generator[Tu
|
|
44 |
full_response = message
|
45 |
for completion in gen:
|
46 |
text = completion.choices[0].text
|
47 |
-
|
|
|
48 |
yield full_response
|
49 |
|
50 |
def create_stream_fn(orig_stream_fn):
|
|
|
44 |
full_response = message
|
45 |
for completion in gen:
|
46 |
text = completion.choices[0].text
|
47 |
+
if text:
|
48 |
+
full_response += text.replace('<', '<').replace('>', '>') or ''
|
49 |
yield full_response
|
50 |
|
51 |
def create_stream_fn(orig_stream_fn):
|