Axlfc / ScriptsEditor

GNU General Public License v2.0
0 stars 0 forks source link

ScriptsEditor: Your Versatile Script Editor

License: GPL-2.0 Platform

ScriptsEditor is a powerful and versatile script writing and editing platform designed for developers, scriptwriters, and coding enthusiasts. With features like advanced script execution using at or crontab, seamless version control integration, and a generative AI assistant, ScriptsEditor provides a comprehensive and user-friendly environment for coding and script management.

ScriptsEditor Screenshot

Table of Contents

Features

Installation

Installing Dependencies

Python

On Windows:
  1. Open PowerShell.
  2. Install Python:
    winget install -e --id Python.Python.3.9
  3. Follow the installer instructions.
  4. Ensure Python is accessible:
    python --version
On GNU/Linux:
  1. Open terminal.
  2. Install Python:
    sudo apt-get update -y
    sudo apt-get install -y python3
  3. Check Python installation:
    python3 --version

Git

On Windows:
  1. Open PowerShell.
  2. Install Git:
    winget install -e --id Git.Git
  3. Verify Git installation:
    git --version
On GNU/Linux:
  1. Open terminal.
  2. Install Git:
    sudo apt-get update -y
    sudo apt-get install -y git
  3. Verify Git installation:
    git --version

Setting up the Project

  1. Clone the repository:

    git clone https://github.com/Axlfc/ScriptsEditor
  2. Navigate to the project directory:

    cd ScriptsEditor
  3. Create a virtual environment:

    • On Windows:
      python -m venv .venv
    • On macOS and Linux:
      python3 -m venv .venv
  4. Activate the virtual environment:

    • On Windows:
      .\.venv\Scripts\activate
    • On macOS and Linux:
      source .venv/bin/activate
  5. Install the required packages:

    • On Windows:

       .\venv\Scripts\pip install -r requirements.txt
       .\venv\Scripts\pip install -r src/models/requirements.txt
       .\venv\Scripts\pip install torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
    • On macOS and Linux:

      venv/bin/pip install -r requirements.txt
      venv/bin/pip install -r src/models/requirements.txt
      venv/bin/pip install torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
  6. Install models:

    Accessing Models on Hugging Face (TO-DO)

To use the stable-audio-open-1.0 model for audio generation in ScriptsEditor, follow these steps:

  1. Create a Hugging Face Account:

    • If you haven't already, create an account on Hugging Face. You can sign up here.
  2. Request Access to the Model:

    • Visit the stable-audio-open-1.0 model page.
    • Click on the "Request Access" button to request access to the model. This step may require accepting terms and conditions specific to the model's license.
  3. Generate an API Token:

    • After your access request is approved, go to your Hugging Face profile settings.
    • Navigate to the API Tokens section and generate a new token. This token will be used to authenticate your access to the model from ScriptsEditor.
  4. Use the API Token in ScriptsEditor:

    • Once you have your API token, you can use it in your ScriptsEditor setup to authenticate requests to the Hugging Face model.

    • Ensure that your token is securely stored and used according to best practices.

    • Get to download the model files

    • stable-audio-open-1.0.ckpt

    • sd-v1-4.ckpt

    • llama-2-7b-chat.Q4_K_M.gguf

    • Create a new folder in this repository in src/models named model

      mkdir src/models/model
    • Create a new folder in this repository in src/models/model named text

      mkdir src/models/model/text
    • Put the .gguf file in src/models/model/text directory.

    • Save Stable Diffusion model in src/models/model/image

    • Save Stable Audio model in src/models/model/audio

We finished setting up ScriptsEditor.

Running ScriptsEditor

Setting up the AI Assistant

Before running ScriptsEditor, you need to set up the AI assistant server. Follow these steps:

  1. Place a valid .gguf file into the folder src/models/model. In this example, the file used is llama-2-7b-chat.Q4_K_M.gguf.

  2. Start the AI assistant server using the following command:

    .\.venv\Scripts\python.exe -m llama_cpp.server --port 8004 --model .\src\models\model\llama-2-7b-chat.Q4_K_M.gguf

After setting up and starting the AI assistant server, you can run ScriptsEditor by executing the main.py script.

Contributing

We welcome contributions! If you'd like to contribute to ScriptsEditor, please check our contribution guidelines.

License

ScriptsEditor is open-source and licensed under the GPL-2.0.

TO-DO: