Use AI to personify books, so that you can talk to them ๐
Use the Talk2Book app on Hugging Face Spaces
Use this to talk to '1984'. Embeddings for this book have already been created so you can use it out of the box ๐ฆ
Use this to see how embeddings for '1984' were made or create your own for another book!
This can't yet do summaries or continue a conversaion; each question gets a single answer. Contributions for these are very welcome!
Save good outputs to use as examples in the prompt (few shot).
- Create a vector store with embeddings using
Book2Vec.ipynb
- Upload to https://huggingface.co as a dataset (recommended)
- Use
Talk2Book.ipynb
with the vector store you created
And make it an app:
- Duplicate this Hugging Face Space (or just copy the code in
app.py
) and change the vector store to the one you created in step 2
- Fork
- Install requirements:
pip install -r requirements.txt
(also at the top of each notebook) - Install nbdev:
pip instal nbdev
- Make changes, run your notebooks
In the terminal, before each commit:
- Run
nbdev_install_hooks
to clean the notebooks (removes metadata)
And finally:
- Submit your PR
Using Codespaces/VSCode
Everything you need will be installed when you open Codespaces/VSCode; specified in .devcontainer/
Notes for Codespaces:
- Currently Jupyter notebook doesnโt work on Codespaces for an unknown reason, or at least I canโt, so youโll have to use JupyterLab
- Open with
jupyter lab --NotebookApp.allow_origin='*' --NotebookApp.ip='0.0.0.0'
- For more info on using see https://code.visualstudio.com/docs/datascience/notebooks-web