Open mohamednihal opened 1 year ago
same it there tried to add the key as the env variable and in the configure.yaml but still there seems to be error
When I run ./train.sh
or run the below code its the same error
I also got the same error when trying to run the examples.
As far as I understood, you have to set the Lamini_api_key before any usage. The KEY is available from this link, after signing in: https://app.lamini.ai/account And there are only 200 inference calls for each account.
import lamini
from lamini import LaminiClassifier
lamini.api_key = "Your_API"
# Create a new classifier
llm = LaminiClassifier()
#prompts
prompts={
"cat": "Cats are generally more independent and aloof than dogs, who are often more social and affectionate. Cats are also more territorial and may be more aggressive when defending their territory. Cats are self-grooming animals, using their tongues to keep their coats clean and healthy. Cats use body language and vocalizations, such as meowing and purring, to communicate.",
"dog": "Dogs are more pack-oriented and tend to be more loyal to their human family. Dogs, on the other hand, often require regular grooming from their owners, including brushing and bathing. Dogs use body language and barking to convey their messages. Dogs are also more responsive to human commands and can be trained to perform a wide range of tasks.",
}
llm.prompt_train(prompts)
You Need to Upload the APi Key from the https://app.lamini.ai/account
import lamini from lamini import LaminiClassifier lamini.api_key = "Your_API" # Create a new classifier llm = LaminiClassifier() #prompts prompts={ "cat": "Cats are generally more independent and aloof than dogs, who are often more social and affectionate. Cats are also more territorial and may be more aggressive when defending their territory. Cats are self-grooming animals, using their tongues to keep their coats clean and healthy. Cats use body language and vocalizations, such as meowing and purring, to communicate.", "dog": "Dogs are more pack-oriented and tend to be more loyal to their human family. Dogs, on the other hand, often require regular grooming from their owners, including brushing and bathing. Dogs use body language and barking to convey their messages. Dogs are also more responsive to human commands and can be trained to perform a wide range of tasks.", } llm.prompt_train(prompts)
You Need to Upload the APi Key from the https://app.lamini.ai/account
okay got it, thank you !
I am giving the same samples of cats and dogs but I'm getting the following error ValueError: Expected 2D array, got 1D array instead: array=[]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
in this llm.prompt_train(prompts)
what mistake am I doing ? any help would be nice :)