Code Monkey home page Code Monkey logo

accel-sf's Introduction

From an Interesting project implements internal GPTs along with media uploads, providing accessible AI / GPT code. Run it on streamlit with some small mods from another project to finesse the student access to secure keys on openai API. Proxy is used to swap an easily acquired proxy-token for much harder to get api key on openai.
A second project detailed below at the hosted proxy link makes it possible for students to sign up, getting a token that is used as a front-end call in place of native calls on the openai API. This is an example of a reverse proxy sitting in front of a protected resource, which openai API is until you have a working api key.
Get started by following instructions below:

clone it and then install the apps dependencies

git clone https://github.com/rowntreerob/accel-sf.git
pip install -r requirements.txt

See the instructions for "Use Our Hosted API Reverse"

hosted proxy

go to the discord server mentioned in the link
sign up  and wait for 10 min to elapse  
follow instructions to get a personal key to use with the reverse proxy
this key used as **OPENAI_API_KEY** in conjunction with api calls to endpt. below  
api.pawan.krd/v1/completions  # note calls on the proxy are relayed to openai

Twilio account credentials

Get an account on twilio
use the dashboard for account, SID, and token
the sample app uses Twilio sms
dashboard will create/list your twilio phone number

ENV vars - manual edit on .streamlit/secrets.toml file

create toml file at project path above on streamlit run on localhost
3 env vars below will be read by the runtime and passed to st.secrets

OPENAI_API_KEY = "<your-key>"
TWILIO_ACCOUNT_SID = "<your-value>"
TWILIO_AUTH_TOKEN = "<your-token>"

run the app using streamlit for host-server

 rob@penguin:~/src/accelerate-sf-hackathon-streamlit$ streamlit run app.py  
  stdout--
  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://100.115.92.199:8501 

Brief instructions with the app

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.