imperiusrex commited on
Commit
3af79ff
·
verified ·
1 Parent(s): 96117b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -8
app.py CHANGED
@@ -19,14 +19,6 @@ extract_model = YOLO("best.pt").to(device)
19
  detect_model = YOLO("yolov8n.pt").to(device)
20
 
21
 
22
- def caption_image_with_llava(image_path):
23
- image = Image.open(image_path).convert("RGB")
24
- prompt = "[INST] <image>\nDescribe what is visible in the image in a concise, factual sentence. [/INST]"
25
- inputs = processor(prompt, images=image, return_tensors="pt").to(device)
26
- outputs = llava.generate(**inputs, max_new_tokens=100, do_sample=False)
27
- caption = processor.decode(outputs[0], skip_special_tokens=True)
28
- return caption
29
-
30
  @spaces.GPU
31
  def process_video(video_path):
32
  os.makedirs("frames", exist_ok=True)
 
19
  detect_model = YOLO("yolov8n.pt").to(device)
20
 
21
 
 
 
 
 
 
 
 
 
22
  @spaces.GPU
23
  def process_video(video_path):
24
  os.makedirs("frames", exist_ok=True)