Suraj Subramanian 6d449a859b New folder structure (#1) | hai 8 meses | |
---|---|---|
.. | ||
Llama2_Gradio.ipynb | hai 8 meses | |
README.md | hai 8 meses | |
requirements.txt | hai 8 meses | |
streamlit_llama2.py | hai 8 meses |
If you prefer to see Llama2 in action in a web UI, instead of the notebooks above, you can try one of the two methods:
Open a Terminal, run the following commands:
pip install streamlit langchain replicate
git clone https://github.com/facebookresearch/llama-recipes
cd llama-recipes/llama-demo-apps
Replace the <your replicate api token>
in streamlit_llama2.py
with your API token created here - for more info, see the note above.
Then run the command streamlit run streamlit_llama2.py
and you'll see on your browser the following UI with question and answer - you can enter new text question, click Submit, and see Llama2's answer:
To see how to query Llama2 and get answers with the Gradio UI both from the notebook and web, just launch the notebook Llama2_Gradio.ipynb
. For more info, on how to get set up with a token to power these apps, see the note on Replicate and OctoAI.
Then enter your question, click Submit. You'll see in the notebook or a browser with URL http://127.0.0.1:7860 the following UI: