Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 :)

Awesome Lists containing this project

README

        

# 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](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-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