saa231 commited on
Commit
1f4f911
·
verified ·
1 Parent(s): 0a232f2

Update project_model.py

Browse files
Files changed (1) hide show
  1. 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
- # Assuming it's a list of dicts with the 'generated_text' field
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: