From 44413fb00a69d13e320509e93fdaef11e0ef8c79 Mon Sep 17 00:00:00 2001 From: Dahai Peng Date: Mon, 12 Aug 2024 18:41:59 +0800 Subject: [PATCH] fix bug --- modelscope_agent/agents/data_science_assistant.py | 6 ------ 1 file changed, 6 deletions(-) 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