Update project_model.py
Browse files- project_model.py +1 -2
project_model.py
CHANGED
|
@@ -210,8 +210,7 @@ def process_inputs(
|
|
| 210 |
|
| 211 |
# Make sure the output is in the expected format (a string)
|
| 212 |
if isinstance(gemma_output, list) and len(gemma_output) > 0:
|
| 213 |
-
|
| 214 |
-
gemma_text = gemma_output[0].get("generated_text", "")
|
| 215 |
if isinstance(gemma_text, str):
|
| 216 |
answer = gemma_text
|
| 217 |
else:
|
|
|
|
| 210 |
|
| 211 |
# Make sure the output is in the expected format (a string)
|
| 212 |
if isinstance(gemma_output, list) and len(gemma_output) > 0:
|
| 213 |
+
gemma_text = gemma_output[0]["generated_text"][-1]["content"]
|
|
|
|
| 214 |
if isinstance(gemma_text, str):
|
| 215 |
answer = gemma_text
|
| 216 |
else:
|