Scottmas
05/08/2023, 10:23 PM/functions/blah.ts
and an asset /blah.html
, how does it determine what gets served with a GET request to /blah
? HTML takes priority I assume?Skye
05/08/2023, 10:26 PMScottmas
05/08/2023, 10:26 PM/functions/index.ts
and /index.html
?Skye
05/08/2023, 10:28 PMScottmas
05/08/2023, 10:28 PMSkye
05/08/2023, 10:28 PMScottmas
05/08/2023, 10:28 PMScottmas
05/08/2023, 10:28 PMSkye
05/08/2023, 10:28 PMScottmas
05/08/2023, 10:29 PMScottmas
05/08/2023, 10:30 PMUnsmart | Tech debt
05/08/2023, 10:36 PMScottmas
05/08/2023, 10:39 PMUnsmart | Tech debt
05/08/2023, 10:40 PMBetter James
05/08/2023, 10:40 PMScottmas
05/08/2023, 10:41 PMUnsmart | Tech debt
05/08/2023, 10:41 PMBetter James
05/08/2023, 10:42 PMUnsmart | Tech debt
05/08/2023, 10:42 PMScottmas
05/08/2023, 10:42 PMScottmas
05/08/2023, 10:43 PMBetter James
05/08/2023, 10:43 PMUnsmart | Tech debt
05/08/2023, 10:43 PMdave
05/08/2023, 11:27 PMdave
05/08/2023, 11:48 PMbiscuit
05/09/2023, 3:09 AMimport * as tf from '@tensorflow/tfjs';
async function loadModel() {
const model = await tf.loadLayersModel('https://custom(r2).domain/models/tfjs_model/model.json');
return model;
}
addEventListener('fetch', (event) => {
event.respondWith(handleRequest(event));
});
async function handleRequest(event) {
try {
const model = await loadModel();
console.log('Model loaded successfully');
return new Response('Model loaded successfully', { status: 200 });
} catch (err) {
console.error('An error occurred:', err);
return new Response('An error occurred:'+err, { status: 500 });
}
}
dave
05/09/2023, 4:34 AMsathoro
05/09/2023, 4:34 AMsathoro
05/09/2023, 4:35 AMsathoro
05/09/2023, 4:35 AM