Skip to content

Instantly share code, notes, and snippets.

@ariviere
ariviere / sketchToObject.js
Created July 22, 2024 23:41
Theta EdgeCloud Sketch to Object JS API
const url = 'YOUR_API_URL';
let eventSource = null;
/**
* Generate a 2D image from a sketch
* @param {File} file - The sketch image file
* @param {string} prompt - The prompt for the image generation
* @param {string} negativePrompt - The negative prompt for the image generation
* @returns {string} the path of the generated 2D image
{
"map": {
"name": "de_cbble",
"phase": "live",
"round": 22,
"team_ct": {
"score": 15,
"name": "Gambit Gaming",
"flag": "CC"
},