Giter VIP home page Giter VIP logo

fastsql-demo's Introduction

FastSQL Demo

Demo

This repository releases a FastSQL demo.

Environments πŸ’«

Step 1: Install Java

Execute the following commands in your terminal:

apt-get update
apt-get install -y openjdk-11-jdk

Step 2: Create and Activate a Virtual Anaconda Environment

Run these commands to set up your virtual environment:

conda create -n demo python=3.8.5
conda activate demo

Step 3: Install Required Python Modules

Ensure you have all necessary packages by running:

conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
pip install -r requirements.txt

Prerequisites πŸͺ

Step 1: Download Classifier Weights

Download the the file sic_ckpts.zip for the schema item classifier. Then, unzip the downloaded file in the root directory of the project:

unzip sic_ckpts.zip

Step 2: Set Up Databases

By default, this project includes only one database (i.e., car) in the databases folder.

  • To add and use your own databases:
    1. Place your SQLite database file in the databases directory.
    2. Update the ./data/tables.json file with the necessary information about your database, including:
      • db_id: The name of your database (e.g., my_db for a database file located at databases/my_db/my_db.sqlite).
      • table_names_original and column_names_original: The original names of tables and columns in your database.
      • table_names and column_names: The semantic names (or comments) for the tables and columns in your database.

Upon completing these steps, your project should be fully configured.

Launch services πŸš€

To initiate the website, execute the following command:

python -u app_fastsql.py

This action will start the web application, making it accessible at http://your_ip:8080/chatbot. Please note that user's history questions will be logged and can be accessed in the data/history/history.sqlite file.

Acknowledgments ✨

Our code are mainly based on text2sql-demo, thanks for their magnificant work.

ALso thanks to the teams behind ChatBotπŸ’¬ WebApp in Python using Flask, BIRD, and Spider for their outstanding contributions to the field.

fastsql-demo's People

Contributors

lihaoyang-ruc avatar weitunglin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.