Stable Diffusion 2.0: a programmer working together with a robot in front of a computer"

How to create a REST API using NodeJS

Perhatikan bahwa ini memakai GPT-J-6B, dijalankan di mesin lokal (tidak terhubung ke Internet). Teks di awal menunjukkan model dan seed yang dipakai ketika mendapatkan jawaban ini.

Gambar dibuat menggunakan AI yang dijalankan di komputer lokal (Stable Diffusion 2.0.)

How to create a REST API using NodeJS

gptj_model_load: loading model from 'models/gpt-j-6B/ggml-model.bin' - please wait ...
gptj_model_load: n_vocab = 50400
gptj_model_load: n_ctx   = 2048
gptj_model_load: n_embd  = 4096
gptj_model_load: n_head  = 16
gptj_model_load: n_layer = 28
gptj_model_load: n_rot   = 64
gptj_model_load: f16     = 1
gptj_model_load: ggml ctx size = 13334.86 MB
gptj_model_load: memory_size =  1792.00 MB, n_mem = 57344
gptj_model_load: ................................... done
gptj_model_load: model size = 11542.79 MB / num tensors = 285
main: number of tokens in prompt = 11

How to create a REST API using NodeJS

A:

This will get you started

var http = require('http');

var server = http.createServer(function(request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.write('Hello World!\n');
response.end();
}).listen(8888, '127.0.0.1');

console.log('Server running at http://127.0.0.1:8888/');

Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.