Arsala Grey commited on
Commit
e7384c3
1 Parent(s): c823c94

fixed empty objects on run error

Browse files
Files changed (1) hide show
  1. index.js +3 -1
index.js CHANGED
@@ -67,8 +67,10 @@ const app = createApp({
67
  })
68
 
69
  const run = async () => {
 
 
 
70
  loading.value = true;
71
- removeDetectedObjects()
72
  try {
73
  const hf = new HfInference(token.value);
74
  const imageData = await getImageBuffer(imageUrl.value);
 
67
  })
68
 
69
  const run = async () => {
70
+ if (detectedObjects.value.length > 0) {
71
+ removeDetectedObjects()
72
+ }
73
  loading.value = true;
 
74
  try {
75
  const hf = new HfInference(token.value);
76
  const imageData = await getImageBuffer(imageUrl.value);