Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,6 +63,13 @@ def generate(
|
|
63 |
for response in stream:
|
64 |
output += response.token.text
|
65 |
yield output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
return output
|
67 |
|
68 |
|
|
|
63 |
for response in stream:
|
64 |
output += response.token.text
|
65 |
yield output
|
66 |
+
|
67 |
+
lines = output.strip().strip("\n").split("\n")
|
68 |
+
#history=""
|
69 |
+
for i,line in enumerate(lines):
|
70 |
+
if line.startswith("choices:"):
|
71 |
+
for z in range(1,5):
|
72 |
+
print(lines[i+z])
|
73 |
return output
|
74 |
|
75 |
|