Connect a database
We start by connecting a demo database using theCREATE DATABASE
statement.
user_comments
table.
Create a Hugging Face model
Our Hugging Face integration automatically manages downloading and deploying of pre-trained transformers from Hugging Face’s hub. For example, we can download a transformer which has been trained to classify the sentiment of text.CREATE MODEL
statement. Next, we define the target column using the PREDICT clause. Finally, we specify all required parameters in the USING
clause.
Once the above query is executed, we can check the status of the creation process:
Make predictions
Once the status is complete, the behavior is the same as with any other AI table you can query it and provide input data in theWHERE
clause, like this: