ScriptSculptor π³
Introduction π
Welcome to our project! Developed with Intel Cloud Developer and love during the thrilling TreeHacks competition. This guide is your compass for navigating through the features, setup, and usage of our application.
Installation π οΈ
To get started, install the required packages using pip:
pip3 install langchain predictionguard duckdb
Setup π
You will need an API key from predictionguard which can be found at https://www.predictionguard.com/. Ensure you have the necessary tokens and environment variables set:
pg_access_token = "your_token_here"
os.environ['PREDICTIONGUARD_TOKEN'] = pg_access_token
π Example
## Example
def test():
present_code = """
from flask import Flask, jsonify
import sqlite3
app = Flask(__name__)"""
question = "could you add api"
method = "GET"
path = "example/path"
api_name = "blah blah"
sql_schema = "\
CREATE TABLE users (\
user_id INTEGER PRIMARY KEY,\
user_name VARCHAR(255)\
);\
\
CREATE TABLE sleep (\
user_id INTEGER,\
time_stamp TIMESTAMP,\
bpm INTEGER,\
FOREIGN KEY (user_id) REFERENCES users(user_id)\
);"
flask_code = text2flask(present_code, question, method, path, api_name, sql_schema)
print(flask_code)
Contributions π
Contributions are welcome! If you have ideas or improvements, please fork the repo and submit a pull request. π³
Acknowledgements π
Big thanks to everyone who participated in the hackathon, our mentors, and the open-source community! π