Update mobilevit.html
Browse files- mobilevit.html +1 -3
mobilevit.html
CHANGED
|
@@ -135,15 +135,13 @@
|
|
| 135 |
const url = URL.createObjectURL(file);
|
| 136 |
// classifier에 url을 입력하여 출력된 결과를 result에 저장하십시오.
|
| 137 |
// To-Do: ???
|
| 138 |
-
|
| 139 |
-
const result = await classifier(url, labels);
|
| 140 |
document.getElementById("outputAreaLocal").innerText = JSON.stringify(result, null, 2);
|
| 141 |
}
|
| 142 |
async function classifyTopImage() {
|
| 143 |
const textFieldValue = document.getElementById("imageClassificationTopURLText").value.trim();
|
| 144 |
// classifier에 textFieldValue를 입력 변수로, topk 파라미터 값을 3으로 설정하여 classifer를 수행하고 그 결과를 result에 저장하십시오.
|
| 145 |
// To-Do: ???
|
| 146 |
-
const labels = document.getElementById("labelsText").value.trim().split(",").map(item => item.trim());
|
| 147 |
const result = await classifier(textFieldValue, { topk: 3 });
|
| 148 |
|
| 149 |
document.getElementById("outputAreaTop").innerText = JSON.stringify(result, null, 2);
|
|
|
|
| 135 |
const url = URL.createObjectURL(file);
|
| 136 |
// classifier에 url을 입력하여 출력된 결과를 result에 저장하십시오.
|
| 137 |
// To-Do: ???
|
| 138 |
+
const result = await classifier(url);
|
|
|
|
| 139 |
document.getElementById("outputAreaLocal").innerText = JSON.stringify(result, null, 2);
|
| 140 |
}
|
| 141 |
async function classifyTopImage() {
|
| 142 |
const textFieldValue = document.getElementById("imageClassificationTopURLText").value.trim();
|
| 143 |
// classifier에 textFieldValue를 입력 변수로, topk 파라미터 값을 3으로 설정하여 classifer를 수행하고 그 결과를 result에 저장하십시오.
|
| 144 |
// To-Do: ???
|
|
|
|
| 145 |
const result = await classifier(textFieldValue, { topk: 3 });
|
| 146 |
|
| 147 |
document.getElementById("outputAreaTop").innerText = JSON.stringify(result, null, 2);
|