reorganize directories

This commit is contained in:
Jeffrey Morgan 2023-06-25 13:08:03 -04:00
parent d3709f85b5
commit b361fa72ec
27 changed files with 59 additions and 49 deletions

5
.gitignore vendored
View file

@ -1,2 +1,7 @@
.DS_Store
.vscode
.env
.venv
*.spec
build
dist

View file

@ -1,8 +1,58 @@
# Prototype
# proto
## Setup
🙊
## Running
Install dependencies:
```
brew install npm
pip install -r requirements.txt
```
Put your model in `models/` and run:
```
python proto.py
```
To run the app:
```
cd desktop
npm install
npm start
```
## Building
If using Apple silicon, you need a Python version that supports arm64:
```bash
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
```
Get the dependencies:
```bash
pip install -r requirements.txt
```
```bash
python3 build.py
```
Then to build the app:
```
cd desktop
npm run package
```
## API
### `POST /generate`
model: `string` - The name of the model to use in the `models` folder.
prompt: `string` - The prompt to use.

View file

@ -7,7 +7,7 @@ site_packages_dir = site.getsitepackages()[0]
llama_cpp_dir = os.path.join(site_packages_dir, "llama_cpp")
args = [
"server.py",
"proto.py",
"--paths",
site_packages_dir,
"--add-data",
@ -17,4 +17,3 @@ args = [
# generate the .spec file and run PyInstaller
pyi_run(args)

5
server/.gitignore vendored
View file

@ -1,5 +0,0 @@
.env
.venv
*.spec
build
dist

View file

@ -1,39 +0,0 @@
# Server
🙊
## Installation
If using Apple silicon, you need a Python version that supports arm64:
```bash
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
```
Get the dependencies:
```bash
pip install -r requirements.txt
```
## Building
```bash
python3 build.py
```
## Running
Put your model in `models/` and run:
```bash
python server.py
```
## API
### `POST /generate`
model: `string` - The name of the model to use in the `models` folder.
prompt: `string` - The prompt to use.