Downloads · 30 days
0
ambigramgenerator/ambigram-generator
ambigram-generator is a machine learning model from ambigramgenerator. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
<titleAmbigram Generator</title <head <link href="https://fonts.googleapis.com/css2?family=Pacifico&family=Dancing+Script:wght@700&family=Caveat:wght@700&family=Indie+Flower&family=Patrick+Hand&family=Shadows+Into+Lig…
Downloads · 30 days
0
Access
Public
Updated Dec 21, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.9 KB · 65%
From the Hugging Face model README
<button onclick="generateAmbigram()">Generate</button> <button onclick="downloadImage()">Download PNG</button>
<br><canvas id="canvas" width="560" height="360"></canvas>
<script> function generateAmbigram() { const word1 = document.getElementById("text1").value || "LOVE"; const word2 = document.getElementById("text2").value || "HATE"; const font = document.getElementById("fontSelect").value; const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = "#ffffff"; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = "#000000"; ctx.textAlign = "center"; ctx.textBaseline = "middle"; ctx.font = "64px " + font; // First word (top) ctx.fillText(word1, canvas.width / 2, 110); // Second word rotated (bottom) ctx.save(); ctx.translate(canvas.width / 2, 260); ctx.rotate(Math.PI); ctx.fillText(word2, 0, 0); ctx.restore(); } function downloadImage() { const canvas = document.getElementById("canvas"); const link = document.createElement("a"); link.download = "two-word-ambigram.png"; link.href = canvas.toDataURL("image/png"); link.click(); } </script> <hr> <p style="font-size:14px;"> Two-word demo • Full ambigram tools at <strong>ambigramtools.com</strong> </p>