/llama-index-flask-demo

A Flask Server Demo Application showing off some llama-index LLM prompt magic, including file upload and parsing :)

Primary LanguagePython

llama-index flask demo

Screenshots

Screen Shot 2023-02-28 at 9 11 45 PM

Screen Shot 2023-02-28 at 9 14 22 PM

Screen Shot 2023-02-28 at 9 17 05 PM

Notes

Implementing https://github.com/jerryjliu/gpt_index and their connectors (in this example twitter from llama-hub twitter_loader in a flask application for prototyping and demo. Needs more work for additional prompt saving. Credits to jdan for the CSS.

Requires OpenAI API Key & Twitter Developer Key (Bearer Token)

install

git clone https://github.com/mewmix/llama-index-flask-demo && cd llama-index-flask-demo


pip install -r requirements.txt

edit the server.py file with your keys and then run.

python3 server.py

Go to browser

http://127.0.0.1:5000/

example prompt

What would be a trendy summary tweet based on this user? 

File upload requires data (supporting docx) in the /data/ folder

llama-index-flask-demo