ImageMaster3000 ist nach C# umgezogen

This commit is contained in:
Simon Lübeß
2023-08-04 15:37:07 +02:00
parent 70da97e23b
commit 41ee4efcce
6 changed files with 79 additions and 60 deletions

View File

@ -1,32 +0,0 @@
import { HfInference } from 'https://cdn.jsdelivr.net/npm/@huggingface/inference@2.6.1/+esm';
import { createRepo, commit, deleteRepo, listFiles } from "https://cdn.jsdelivr.net/npm/@huggingface/hub@0.8.4/+esm";
async function DoSexyStuff(prompt)
{
const HF_ACCESS_TOKEN = "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";
const inference = new HfInference(HF_ACCESS_TOKEN);
const blob = await inference.textToImage({
//model: 'stabilityai/stable-diffusion-2',
model: 'Nacken/ki-kunst-kirsten-kloeckner-colab',
//inputs: 'award winning high resolution photo of a giant tortoise/((ladybird)) hybrid, [trending on artstation]',
inputs: prompt,
parameters: {
negative_prompt: 'blurry',
}
})
const imageUrl = window.URL.createObjectURL(blob);
return imageUrl;
//window.open(imageUrl, '_blank');
}
// Exportiere die Funktion in den globalen Kontext
window.DoSexyStuff = DoSexyStuff;
function showAlert(message) {
alert(message);
}