- Following this video: https://www.youtube.com/watch?v=J8TgKxomS2g&t=702s
- Read up on Replicate and signed up for an account.
- Background on Replicate (also has some alternatives mentioned): https://techcrunch.com/2023/02/21/replicate-wants-to-take-the-pain-out-of-running-and-hosting-ml-models
- Tested the Llama 2 chatbot at https://llama2.streamlit.app/
- Reset my github password (neocybersonic), and logged in to Replicate with my github credentials
- Found this guide on how to build streamlit apps (I didn’t end up using this, but this is good for future reference)
- Signed up for Streamlit, and logged in using github credentials (neocybersonic)
- Copied the code from the tutorial repository to my own private repo
- Tutorial repo: https://github.com/dataprofessor/llama2/
- My repo: https://github.com/neocybersonic/StreamlitTest2
- Deployed the app with streamlit – but realized that I need to update the code
- Went to replicate the github repo on my Mac, realized git was out of date, and so was home brew
- Ran brew update; brew upgrade; brew doctor – multiple times, git is now up to date!
- Set up github personal access token on the repository so I can clone it
- Went into permissions hell with github but finally figured it out using “fine grained” personal access tokens and granting all access one by one.
- See also:
- https://stackoverflow.com/questions/2505096/clone-a-private-repository-github
- Cloned the repo to my Mac
- Updated the main app.py file and committed, and pushed a minor change
- Wow! The change is near instantly updated in the Streamlit app! Because it is linked directly to the github repository! Very cool… no need to deploy my changes to production, it’s instant!
- The Streamlit app has an input field for the Replicate token, so I entered one of my tokens and asked three questions. On the Replicate dashboard, I can see that the prompts went through and queried Replicate and it shows the results there as well. Works end to end! That covers everything in the youtube video.
- What’s next?
- How do I use this code base to build a chatbot of my own that also queries my own data?
- To do this I need to do the following:
- Obtain a data set to go off of, set of PDFs?
- Convert to a set that can be used by the chat technology
- Found this service that lets you upload PDFs and chat with them: https://www.hipdf.com/chat-with-pdf
- This site does PDF “markdown” for you, converting PDFs to a format for use by chatbot: https://www.taskade.com/convert/pdf/pdf-to-markdown
- This software marks down PDFs to whatever you want https://pandoc.org/index.html
- This python library converts PDF to text: https://www.askpython.com/python/examples/convert-pdf-to-txt
- Architect it so that it can query the data properly and augment the generalized genAI
Leave a comment