瀏覽代碼

reorganize directories

Jeffrey Morgan 1 年之前
父節點
當前提交
b361fa72ec

+ 5 - 0
.gitignore

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

+ 53 - 3
README.md

@@ -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.

+ 1 - 2
server/build.py → build.py

@@ -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)
-

+ 0 - 0
client/.eslintrc.json → desktop/.eslintrc.json


+ 0 - 0
client/.gitignore → desktop/.gitignore


+ 0 - 0
.prettierrc.json → desktop/.prettierrc.json


+ 0 - 0
client/forge.config.ts → desktop/forge.config.ts


+ 0 - 0
client/images/icon.icns → desktop/images/icon.icns


+ 0 - 0
client/package-lock.json → desktop/package-lock.json


+ 0 - 0
client/package.json → desktop/package.json


+ 0 - 0
client/postcss.config.js → desktop/postcss.config.js


+ 0 - 0
client/src/app.css → desktop/src/app.css


+ 0 - 0
client/src/app.tsx → desktop/src/app.tsx


+ 0 - 0
client/src/index.html → desktop/src/index.html


+ 0 - 0
client/src/index.ts → desktop/src/index.ts


+ 0 - 0
client/src/preload.ts → desktop/src/preload.ts


+ 0 - 0
client/src/renderer.tsx → desktop/src/renderer.tsx


+ 0 - 0
client/tailwind.config.js → desktop/tailwind.config.js


+ 0 - 0
client/tsconfig.json → desktop/tsconfig.json


+ 0 - 0
client/webpack.main.config.ts → desktop/webpack.main.config.ts


+ 0 - 0
client/webpack.plugins.ts → desktop/webpack.plugins.ts


+ 0 - 0
client/webpack.renderer.config.ts → desktop/webpack.renderer.config.ts


+ 0 - 0
client/webpack.rules.ts → desktop/webpack.rules.ts


+ 0 - 0
server/server.py → proto.py


+ 0 - 0
server/requirements.txt → requirements.txt


+ 0 - 5
server/.gitignore

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

+ 0 - 39
server/README.md

@@ -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.