This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
content: [ | |
{ | |
source: { | |
data: imageData, | |
media_type: 'image/jpeg', | |
type: 'base64' | |
}, | |
type: 'image' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.post("/api/invoke-prompt") | |
async def invoke_prompt(req: Request): | |
try: | |
body = await req.json() | |
return { | |
"response": await invoke_model_stream( | |
{ | |
"messages": body["messages"], | |
"max_tokens": 3100, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const reader = new FileReader() | |
reader.onload = async (e) => loadPrompt(e.target.result) | |
reader.readAsArrayBuffer(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Form.Control | |
accept='.jpg,.png' | |
multiple={true} | |
onChange={(e) => parseFiles(e.target.files).then(sendFiles)} | |
type='file' | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { basename, join } = require('path') | |
const { DynamoDB } = require('aws-sdk') | |
const { readFileSync } = require('fs') | |
const glob = require('glob') | |
const doc = new DynamoDB.DocumentClient({ | |
region: 'eu-west-2' | |
}) | |
glob(join(process.cwd(), 'seed/db/*.json'), (error, files) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +ahmednuaman is my blockchain ID. https://onename.com/ahmednuaman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM octohost/base:trusty | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys C300EE8C; \ | |
echo 'deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main' > /etc/apt/sources.list.d/nginx-stable-trusty.list; \ | |
apt-get update; \ | |
apt-get install -y nginx git | |
ADD /tmp-conf/default /etc/nginx/sites-available/default | |
ADD /tmp-conf/nginx.conf /etc/nginx/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/vivid64" | |
config.vm.network "forwarded_port", guest: 80, host: 8000 | |
config.vm.synced_folder ".", "/var/www/html" | |
config.ssh.forward_agent = true | |
config.vm.provision "shell", inline: <<-SHELL | |
export DEBIAN_FRONTEND=noninteractive | |
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) | |
/******/ return installedModules[moduleId].exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cwd = process.cwd(), | |
path = require('path'); | |
module.exports = function (config) { | |
config.set({ | |
basePath: cwd, | |
browsers: [ | |
'Chrome' | |
], | |
files: [ |
NewerOlder