我正在制作 Automl 的对象,我正在调用函数初始设置,它显示一个文本小部件,当提交文本时,它调用 target_submit_handler,它在内部调用classification_setup
它调用setup()
pycaret 库但是当调用设置函数时,我正在结束文件错误:
from pycaret.classification import *
class AutoMl():
def __init__(self):
self.dataframe=pd.DataFrame()
self.w=None
self.setup=None
def classification_setup(self,data,target):
x=setup(self.dataframe, "Species") //this fucntion is of pycaret library which displays the end of file er
def target_submit_handler(self,text):
# print(self.dataframe,self.target.value) I am geting the correct dataframe and target column name
self.classification_setup(data=self.dataframe,target="Species")
def initial_setup(self,dataframe=None,target=None):
if(dataframe==None and target==None):
if(self.dataframe.empty!=True):
self.target = widgets.Text(description = 'Enter the target column')
self.target.on_submit(self.target_submit_handler)
display(self.target)
f=AutoMl()
f.initial_setup() //end of file error
这是文件错误的结尾: