Spaces:
Sleeping
Sleeping
fix
Browse files- gemmademo/_model.py +5 -1
gemmademo/_model.py
CHANGED
|
@@ -130,10 +130,14 @@ class LlamaCppGemmaModel:
|
|
| 130 |
stream=True,
|
| 131 |
)
|
| 132 |
|
|
|
|
| 133 |
for chunk in response_stream:
|
| 134 |
delta = chunk["choices"][0]["delta"]
|
| 135 |
if "content" in delta:
|
| 136 |
-
|
|
|
|
|
|
|
|
|
|
| 137 |
|
| 138 |
def get_model_info(self) -> Dict:
|
| 139 |
"""
|
|
|
|
| 130 |
stream=True,
|
| 131 |
)
|
| 132 |
|
| 133 |
+
outputs = ""
|
| 134 |
for chunk in response_stream:
|
| 135 |
delta = chunk["choices"][0]["delta"]
|
| 136 |
if "content" in delta:
|
| 137 |
+
outputs += delta["content"]
|
| 138 |
+
yield outputs
|
| 139 |
+
|
| 140 |
+
return outputs
|
| 141 |
|
| 142 |
def get_model_info(self) -> Dict:
|
| 143 |
"""
|