diff --git a/modelscope_agent/agents/data_science_assistant.py b/modelscope_agent/agents/data_science_assistant.py index 26d542d7..2b060cad 100644 --- a/modelscope_agent/agents/data_science_assistant.py +++ b/modelscope_agent/agents/data_science_assistant.py @@ -651,10 +651,6 @@ def _run(self, user_request, save: bool = True, **kwargs): code = self._generate_code(code_counter, task, user_request) code = '%matplotlib inline \n' + code - # if self.streamlit: - # st.divider() - # st.write("We have generated the code for the current task") - # st.code(code, language='python') code_execute_success, code_interpreter_resp = temp_code_interpreter.call( params=json.dumps({'code': code}), nb_mode=True, @@ -720,8 +716,6 @@ def _run(self, user_request, save: bool = True, **kwargs): ) task.code = code task.result = code_interpreter_resp - else: - self.code_interpreter.nb.cells.pop() code_counter += 1 # save the successful code in jupyter notebook