JasperHaozhe commited on
Commit
a2d7bbd
·
verified ·
1 Parent(s): 15c9525

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -206,7 +206,7 @@ def model_inference(input_dict, history):
206
 
207
  # Process the full segment (e.g., remove <|im_end|>)
208
  processed_segment = current_model_output_segment.split("<|im_end|>", 1)[0] if "<|im_end|>" in current_model_output_segment else current_model_output_segment
209
- messages.append(dict(role='assistant', content=processed_segment))
210
  # Append this processed segment to the cumulative display string for Gradio
211
  complete_assistant_response_for_gradio += [processed_segment + "\n\n"]
212
  yield complete_assistant_response_for_gradio # Ensure the fully processed segment is yielded to Gradio
 
206
 
207
  # Process the full segment (e.g., remove <|im_end|>)
208
  processed_segment = current_model_output_segment.split("<|im_end|>", 1)[0] if "<|im_end|>" in current_model_output_segment else current_model_output_segment
209
+ # messages.append(dict(role='assistant', content=processed_segment))
210
  # Append this processed segment to the cumulative display string for Gradio
211
  complete_assistant_response_for_gradio += [processed_segment + "\n\n"]
212
  yield complete_assistant_response_for_gradio # Ensure the fully processed segment is yielded to Gradio