The project demonstrates how VulcanSQL can leverage the power of Hugging Face Table Question Answering through the huggingface_table_question_answering
filter to perform simple data queries.
Datasets: https://www.kaggle.com/datasets/chasewillden/topstarredopensourceprojects
Used DuckDB connector be the data source and get the CSV result from DuckDB function.
- Install VulcanSQL CLI package, here use
yarn
, you could usenpm
by yourself.
$ yarn install -g @vulcan-sql/cli
- Go to the project directory and install all the packages from
package.json
$ yarn install
- Create your HuggingFace User Access Token and add to
vulcan.yaml
:
hf:
accessToken: "<your access token>"
- Start VulcanSQL in the terminal
$ vulcan start --watch
Now the API docs is auto generated at http://localhost:3000/doc and API /repositories
already.
Here We use Postman to send API Request.
- Send the
Find the repository has the most stars?
question by query string:
VulcanSQL responds to the HuggingFace Table Question Answering original output, but converts it to a JSON string.
- Send the
How many repositories use Python language? Give repository name
question by query string:
Same output format as the above, VulcanSQL responds to the HuggingFace Table Question Answering original output, but converts it to a JSON string.
For more information about VulcanSQL huggingface_table_question_answering
filter, please see HuggingFace extension.