LET'S CREATE THE MODEL BY SENDING THE PARAMETERS TO PREDICTNOW.AI
response = client.create_model
(
username=username, # only letters, numbers, or underscores
model_name=modelname,
params=params,
)
print(response)
LET'S LOAD UP THE FILE TO PANDAS IN THE LOCAL ENVIRONMENT
from pandas import read_csv # If you have the Excel file, replace read_csv with read_excel
from pandas import read_excel
df = read_excel(file_path) # Same here
df.name = "testdataframe" # Optional, but recommended
print(df)
START TRAINING MODEL
NOTE: THIS MAY TAKE UP TO several minutes
response = client.train
(
model_name=modelname,
input_df=df,
label=labelname,
username=username,
email=email,
return_output=False
)
print("THE CLIENT HAS SENT THE DATASET TO THE SERVER AND TRIGGERED THE TRAINING MODEL TASK")
print(response)
CHECK THE STATUS OF THE MODEL
status = client.getstatus(
username=username,
train_id=response["train_id"]
)
print("Current status:")
print(status)
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.