The first time you speak, the speech transcription backend will take a few seconds to calibrate to the level of ambient noise in your environment. You will know it's ready for transcription when you see a "Listening..." message appear below the Record button. Calibration only occurs once to save time.
Task Mode provides a miscellaneous assortment of built-in prompts for the following tasks:
- Summarization
- Explain like I'm 5
- Translation
- How To (step by step instructions for performing everyday tasks)
- Writing Style Analysis
- Explain machine learning concepts in simple language
- Generate ML paper abstracts
- MMA Fight Analysis and Prediction
CTRL + SHIFT: Start recording audio (same as pressing the "Record" button).
CTRL + a: Get GPT-3's response to whatever input you've recorded (same as pressing the "Get Response" button).
Use the following steps to set up your environment and run the GUI.
- Clone the repo.
git clone https://github.com/hdmamin/jabberwocky.git
- Install the necessary packages. I recommend using a virtual environment of some kind (virtualenv, conda, etc). If you're using Mac OS and virtualenv, you can use the command
make gui_env
to create a virtual environment for the GUI. If you're not using Mac OS or prefer to use a different environment manager, you can view gui/make_env.sh
to see what logic is actually being executed. Note: the alexa skill uses a newer version of jabberwocky that is not backward compatible, so you can't run the GUI and the skill in the same virtual environment.
- Add your openai API key somewhere the program can access it. There are two ways to do this (make sure to use your actual key, not the literal text
your_openai_api_key
):
echo your_openai_api_key > ~/.openai
or
export OPENAI_API_KEY=your_openai_api_key
If you plan to use other backends like huggingface, goose.ai, or banana.dev, you should make their api key(s) available too.
echo your_gooseai_api_key > ~/.gooseai
echo your_huggingface_api_key > ~/.huggingface
echo your_banana_api_key > ~/.banana
- Run the gui from inside your virtual environment.
source gui/venv/bin/activate
python gui/main.py
make run_gui
also works.
Developer Tip
If you plan to push new changes to github, I'd recommend using the command make hooks
to install a git pre-commit hook to prevent you from accidentally exposing your openai API key. (This shouldn't happen regardless but the hook provides some layer of safety in case you print your key in a notebook or something.) You only need to run this once. You can also use the file pre-commit.py
in the project root as a reference for creating your own hook.
Outstanding Issues
Here is a (possibly incomplete) list of changes that would need to be made for the GUI to be compatible with Jabberwocky v2.
- Change all references to the "engine_i" query parameter to "model" and ensure that this doesn't cause any conflicts with existing "model" variables.
- Update model options to reflect the ones that are actually available in jabberwocky.config. For example, the Huggingface models provided in the GUI are not the same as the ones provided by jabberwocky v2.
- Test everything end to end.
Start of auto-generated file data.
Last updated: 2022-06-25 11:03:46
File | Summary | Line Count | Last Modified | Size |
---|---|---|---|---|
callbacks.py | Callbacks for our dearpygui app. Note that this module relies on a number of global variables which are defined after import in main.py: -APP -SPEAKER -CHUNKER -CONV_MANAGER -MANAGER -GENDER2VOICE -MODEL_NAMES -NAME2TASK Pycharm highlights these as errors since they appear to be undefined when looking at this module in isolation. |
995 | 2022-05-21 17:43:01 | 43.53 kb |
main.py | Launches a GUI providing an audio interface to GPT3. Example usage: -------------- python gui/main.py |
765 | 2022-05-21 17:43:01 | 40.10 kb |
utils.py | General utilities used in our GUI that aren't callbacks. Note: this relies on the SPEAKER variable defined in main.py (main.py makes this variable available after importing utils - just making note of it here since pycharm will show errors since SPEAKER is undefined at definition time). |
364 | 2021-09-12 13:54:19 | 14.33 kb |
End of auto-generated file data. Do not add anything below this.