Talk2Book
Talk2Book copied to clipboard
Use AI to personify books, so that you can talk to them π
Talk2Book π
Use AI to personify books, so that you can talk to them π
Notebooks
Talk2Book.ipynb
Use this to talk to '1984'. Embeddings for this book have already been created so you can use it out of the box π¦
Book2Vec.ipynb
Use this to see how embeddings for '1984' were made or create your own for another book!
Limitations
This can't yet do summaries or continue a conversaion; each question gets a single answer. Contributions for these are very welcome!
Potential improvements
Save good outputs to use as examples in the prompt (few shot).
How can I talk to another book?
- Create a vector store with embeddings using
Book2Vec.ipynb - Upload to https://huggingface.co as a dataset (recommended)
- Use
Talk2Book.ipynbwith 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
Contributing
- 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_hooksto 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