1<!DOCTYPE html> 2<html lang="ko"> 3 4<head> 5 <meta charset="UTF-8"> 6<!-- This site is hosted on Netlify. Anyone can build and deploy a site 7 like this one for free: https://netlify.new/?utm_campaign=loops&utm_source=ai-legible&utm_medium=owned&utm_content=comment&utm_id=171af0f2-71fa-4a1c-bae2-14157ea14ee6 8 Netlify hosting facts for this site: static/SSR served via Netlify Edge. --> 9 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 10 <title>ì¸ê³µì§ë¥ ê³¼ì¼ì í ì¤í¸</title> 11 <link rel="stylesheet" href="style.css"> 12 <link rel="shortcut icon" href="favicon.png" type="image/x-icon"> 13</head> 14 15<body> 16 <div class="header"> 17 <h1>ðððê³¼ì¼ì í ì¤í¸ððð</h1> 18 <h3>ì¼êµ´ë¡ ë³´ë ì¸ê³µì§ë¥ ê³¼ì¼ì í ì¤í¸</h3> 19 </div> 20 <div class="container"> 21 <div id="upload-area" class="area"> 22 <span class="guide-image">ð¸</span> 23 <br /> 24 <span>ì¬ì§ì ì¬ë ¤ëê±°ë ëë¬ì ì ë¡ëí´ì£¼ì¸ì!</span> 25 <input id="upload-input" style="display: none;" type="file" accept="image/*" onchange="readFile(this.files[0]);" /> 26 </div> 27 <div id="share-area" class="area"> 28 <h3>ê³¼ì¼ì í ì¤í¸ ê³µì í기</h3> 29 <div class="addthis_inline_share_toolbox"></div> 30 </div> 31 <div id="loading-area" class="area" style="display: none;"> 32 <span class="guide-image">ð¹ð</span> 33 <br />
34 <span>ì¸ê³µì§ë¥ 모ë¸ì ë¶ë¬ì¤ë ì¤ì ëë¤...</span> 35 </div> 36 <div id="result-area" class="area" style="display: none;"> 37 <img id="upload-image" src="#" alt="youra image" /> 38 <div id='label-container'></div> 39 </div> 40 <div id="retry-area" class="area" style="display: none;"> 41 <span>ë¤ë¥¸ ì¬ì§ì¼ë¡ í ì¤í¸íë ¤ë©´ ëë¬ì£¼ì¸ì!</span> 42 </div> 43 </div> 44 <div id="disqus_thread"></div> 45 46 47
47<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest/dist/tf.min.js"></script>
47 48
48<script src="https://cdn.jsdelivr.net/npm/@teachablemachine/image@latest/dist/teachablemachine-image.min.js"></script>
48 49
49<script type="text/javascript"> 50 51 const URL = "https://teachablemachine.withgoogle.com/models/L70E2v9g3/"; 52 53 let model, webcam, labelContainer, maxPredictions; 54 let isModelReady = false; 55 let input = document.getElementById("upload-input"); 56 let image = document.getElementById("upload-image"); 57 let loadingArea = document.getElementById("loading-area"); 58 let uploadArea = document.getElementById("upload-area"); 59 let shareArea = document.getElementById("share-area"); 60 let resultArea = document.getElementById("result-area"); 61 let retryArea = document.getElementById("retry-area"); 62 const reader = new FileReader(); 63 64 async function readFile(file) { 65 uploadArea.style.display = "none"; 66 shareArea.style.display = "none"; 67 if(isModelReady === false) { 68 loadingArea.style.display = "block"; 69 await init() 70 } 71 reader.readAsDataURL(file); 72 } 73 74 reader.onload = async function(event) { 75 await image.setAttribute('src', event.target.result); 76 await predict(); 77 loadingArea.style.display = "none"; 78 resultArea.style.display = "block"; 79 retryArea.style.display = "block"; 80 }; 81 82 uploadArea.onclick = function() { 83 input.click(); 84 } 85 86 uploadArea.ondragover = function(event) { 87 event.preventDefault(); 88 } 89 90 uploadArea.ondrop = function(event) { 91 event.preventDefault(); 92 const file = event.dataTransfer.files[0]; 93 readFile(file); 94 } 95 96 retryArea.onclick = function() { 97 retryArea.style.display = "none"; 98 resultArea.style.display = "none"; 99 uploadArea.style.display = "block"; 100 shareArea.style.display = "block"; 101 input.value = ""; 102 } 103 104 async function init() { 105 const modelURL = URL + "model.json"; 106 const metadataURL = URL + "metadata.json"; 107 108 model = await tmImage.load(modelURL, metadataURL); 109 maxPredictions = model.getTotalClasses(); 110 111 labelContainer = document.getElementById("label-container"); 112 for (let i = 0; i < maxPredictions + 1; i++) { 113 labelContainer.appendChild(document.createElement("div")); 114 } 115 } 116 117 async function predict() { 118 const prediction = await model.predict(image); 119 prediction.sort((x, y) => y.probability - x.probability); 120 121 switch (prediction[0].className) { 122 case "ë©ë¡ ": 123 labelContainer.childNodes[0].innerHTML = `<h3>ë¹ì ì ë©ë¡ ì!ð</h3> 124 <p>ë¹ì ì ê²ì¼ë¡ë ìë¹í ë¤ìê³³í´ ë³´ì´ë íì ì´ì§ë§ ë§ìììë ì¸ì ë í° í¬ë¶ë ì´ìì íê³ ìë ì¬ëì ëë¤. 125 ë¨ì´ íìë ëë¡ ë°ë¼ê°ê¸° ì«ì´íë©°, ì기 ëë¦ëë¡ì ì´ìì´ë ì ë ì ìí´ ì´ê³ ì ë ¸ë ¥íë ë¹ì ! 126 ì´ë° ì ë¤ ë문ì ë¤ì ìê³ íë¤ë ì기를 ë£ê¸°ë íë¤ì, ê¸ì ì ì¸ ì구 ìì ëêµ¬ë³´ë¤ ê°íê³ ëì ë§ì´ 모ì¼ë ¤ë ìë§ì´ ë§ììì í¬ê² ì리 ì¡ê³ ìë¤ì. 127 ë, ì¬í í¬ ë¶ì¼ì ìë¹í ë¥ë ¥ì ê°ì§ê³ ììµëë¤. ë구ìê² ì§ë ê²ì ë§¤ì° ì«ì´íê³ ëª¨ë ì¼ì ìµê³ ê° ë길 ê¿ê¾¸ë ì¼ì¬ê° íì !</p>`; 128 break; 129 case "ì¬ê³¼": 130 labelContainer.childNodes[0].innerHTML = `<h3>ë¹ì ì ì¬ê³¼ì!ð</h3> 131 <p>ë¹ì ì 모ë ì¼ë¤ì ì ííê² ì²ë¦¬í´ì¼ ì§ì±ì´ í리ë ì±ì¤í ì±ê²©ì ìì ìì ëë¤. 132ì¦, ì ëë¡ ë¬´ë¦¬í´ì ì¼ì ì²ë¦¬íì§ ìê³ ì ë¹í ìê°ì ëê³ ê¼¼ê¼¼íê² ì²´í¬íë íì ì ëë¤. 133ì´ë¤ ê³¼ì ê° ì£¼ì´ì¡ì ë ë°¤ì ì§ìì°ë©° í기보ë¤ë ì¼ì í ìê°ì ì¬ê³ ì¼ì í ìê°ì ì§ì¤í´ì ê³¼ì 를 ìì±í´ë ëë¤. 134ìì´ë¥¸ì 공경íê³ ìì ë°ë¥¸ ë¹ì , ììë 매ëì 민ê°í´ì ê·¸ê²ì ì´ê¸ëë ì¬ëë¤ì êµì¥í ì«ì´í©ëë¤. 135í¹í ë¶ì ì¬ê³¼ë¥¼ ì¢ìíë ì¬ëì ëì¸ê´ê³ì ì¸ì¬í ì ê²½ì ì°ë©° ê³ ì§ìíë¤ë ì´ì¼ê¸°ë¥¼ ì주 ë£ê³ ë í©ëë¤.</p>`; 136 break;
137 case "ë³µìì": 138 labelContainer.childNodes[0].innerHTML = `<h3>ë¹ì ì ë³µììì!ð</h3> 139 <p>ë¹ì ì ëì²´ë¡ ì¨íí ì±ê²©ì ê°ì¡ê³ ë구ìë ìë§í ì¸ê°ê´ê³ë¥¼ ì ì§í©ëë¤. 140ë¤ì ì¸ì§¢ì ì¼ì´ ìì´ë íì ì¼êµ´ìë 미ìê° ë ëì§ ìë ë¹ì , ì´ë¬í ì±ê²© ë문ì 주ì ì¬ëë¤ìê² íì íì´ ì¢ê³ ì ë ë¨ìê² ë¯¸ìì ë°ì§ ìë ì¤íì¼ì ëë¤. 141ëí ë§¤ì° ê°ì ì ì´ì´ì ì§ìì¼ì ì¶©ì¤íë©° ê·¸ê²ì ì¦ê¸°ë ë¹ì , ë¤ìí 모ìì ìê°ì ì¦ê¸°ê³ ê·¸ ììì ìëì§ë¥¼ ì¶©ì íëêµ°ì? 142íì§ë§ ëë¡ë ë무 ì¬ëì´ ì¢ì ë³´ì¬ ìí´ë¥¼ ë³´ë ê²½ì°ë ì¢ ì¢ ìì¼ë 주ìíì¸ì!</p>`; 143 break; 144 case "체리": 145 labelContainer.childNodes[0].innerHTML = `<h3>ë¹ì ì 체리ì!ð</h3> 146 <p>ë¹ì ì ì ì´ì ì¸ ì¤íì¼ë¡ ë ê°ì´ìì 무ìì¸ê° ë¶íê³ ìë ê¿ì´ ê±°ì°½í ì¤íì¼ì ëë¤. 147ì¤ë¦´ì´ë ë³í를 ì¢ìí´ íì ë°í ë¯í ì¶ ìììì ê¶í를 ê±°ë¶íë©°, 무ìì´ë ì§ íë² ììí ì¼ì ì´ì¬í ìµì ì ë¤íë ì ê·¹ì ì¸ íì ì ë¹ì ! 148ê·¸ë¦¬ê³ ë¹ì ì ì½ê° ì¬ëì ìì ë§ì 기ì¤ì ì í´ ê°ë¦¬ë©´ì ì¬ê·ë ê²½í¥ì´ ìì¼ë©°, 첫ì¸ì ë§ì¼ë¡ ì´ë¤ ì¬ëì íê°íë ì¼ì´ ì¢ ì¢ ìë¤ì! 149íì§ë§ ë¹ì ì ì¥ì ì 목íí ì¼ì´ ì´ë ¤ìì ë¶ëªíëë¼ë í¬ê¸° ìê³ ê³¼ê°íê² ë°ê³ ëê°ë ì¶ì§ë ¥ê³¼ ì´ì ì ììµëë¤.</p>`; 150 break; 151 case "í¬ë": 152 labelContainer.childNodes[0].innerHTML = `<h3>ë¹ì ì í¬ëì!ð</h3> 153 <p>ë¹ì ì ì¸ë¡ìì ë§ì´ íë©°, ìì ì í ë리 ììì ëì¤ê¸°ë¥¼ êº¼ë ¤í©ëë¤. 154ë°ë©´ 미ì ê°ê°ì´ë ììë ¥, ì°½ìë ¥ì ë구보ë¤ë íë¶íë©° ì´ë¥¼ ë°íì¼ë¡ ìì ë§ì ë í¹í ê°ì±ì ë°ì ìì¼ ëìê°ëë¤. 155ë¹ì ì ë¨ë¤ì´ ê°ê¹ì´í기 ì´ë ¤ìíë ì°¨ê°ì´ ë©´ì ê°ì§ê³ ìì§ë§ ë§ìì ì ë§ ë°ë»í ë°ì ë§¤ë ¥ì ê°ì§ê³ ììµëë¤. 156ê²ì¼ë¡ ë³´ì´ë íëê³¼ 본ì¬ì´ í¬ê² ì°¨ì´ëë íì ì¼ë¡ ë¹ì ì ì ì°¨ ììê°ë ì¬ëë¤ì ì´ë¬í ë¹ì ì ë§¤ë ¥ì ë¹ ì§ê³ ë§ëë°ì! 157ìëë°©ê³¼ ê´ê³ë¥¼ 맺ì´ëê°ëë° ê½¤ ì¤ë ìê°ì´ 걸리ì§ë§ ì¼ë¨ ì¹í´ì§ê² ëë©´ ìì ì 모ë ê²ì ì£¼ë ¤ê³ íë ì¤íì¼ì ëë¤.</p>`; 158 break; 159 } 160 for (let i = 0; i < maxPredictions; i++) { 161 const classPrediction = 162 prediction[i].className + ": " + Math.round(prediction[i].probability * 100) + "%"; 163 labelContainer.childNodes[i+1].innerHTML = classPrediction; 164 } 165 isModelReady = true; 166 } 167 </script>
167 168
168<script> 169 /** 170 * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. 171 * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */ 172 /* 173 var disqus_config = function () { 174 this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable 175 this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable 176 }; 177 */ 178 (function() { // DON'T EDIT BELOW THIS LINE 179 var d = document, s = d.createElement('script'); 180 s.src = 'https://ingongjineung-gwailsang-teseuteu.disqus.com/embed.js'; 181 s.setAttribute('data-timestamp', +new Date()); 182 (d.head || d.body).appendChild(s); 183 })(); 184</script>
184 185<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
186<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-63fe889387386870"></script>
186 187</body> 188</html> 189
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.