GithubHelp home page GithubHelp logo

mewmix / llama-index-flask-demo Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 2.0 101 KB

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

Python 39.66% JavaScript 7.72% CSS 25.58% HTML 27.04%
flask llm python server llama-index chat-gpt language-model open-ai prompt-engineering ai

llama-index-flask-demo's Introduction

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

llama-index-flask-demo's People

Contributors

mewmix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.