Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mewmix/llama-index-flask-demo
A Flask Server Demo Application showing off some llama-index LLM prompt magic, including file upload and parsing :)
https://github.com/mewmix/llama-index-flask-demo
ai chat-gpt flask language-model llama-index llm open-ai prompt-engineering python server
Last synced: 14 days ago
JSON representation
A Flask Server Demo Application showing off some llama-index LLM prompt magic, including file upload and parsing :)
- Host: GitHub
- URL: https://github.com/mewmix/llama-index-flask-demo
- Owner: mewmix
- Created: 2023-03-01T05:07:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T06:15:32.000Z (almost 2 years ago)
- Last Synced: 2024-12-04T04:33:22.980Z (about 2 months ago)
- Topics: ai, chat-gpt, flask, language-model, llama-index, llm, open-ai, prompt-engineering, python, server
- Language: Python
- Homepage:
- Size: 98.6 KB
- Stars: 20
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - mewmix/llama-index-flask-demo - A Flask Server Demo Application showing off some llama-index LLM prompt magic, including file upload and parsing :) (Python)
README
# llama-index flask demo
### Screenshots
### Notes
Implementing https://github.com/jerryjliu/gpt_index and their connectors (in this example twitter from [llama-hub](https://llamahub.ai/) [twitter_loader](https://github.com/emptycrown/llama-hub/tree/main/loader_hub/twitter) in a flask application for prototyping and demo. Needs more work for additional prompt saving. Credits to [jdan](https://github.com/jdan/98.css ) 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-demopip 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