imperiusrex commited on
Commit
96117b7
·
verified ·
1 Parent(s): 0a834b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -18,13 +18,6 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
18
  extract_model = YOLO("best.pt").to(device)
19
  detect_model = YOLO("yolov8n.pt").to(device)
20
 
21
- # Load LLaVA-HF LLM and processor
22
- processor = LlavaNextProcessor.from_pretrained("llava-hf/llava-v1.5-7b-hf")
23
- llava = LlavaNextForConditionalGeneration.from_pretrained(
24
- "llava-hf/llava-v1.5-7b-hf",
25
- torch_dtype=torch.float16 if device == "cuda" else torch.float32,
26
- low_cpu_mem_usage=True
27
- ).to(device)
28
 
29
  def caption_image_with_llava(image_path):
30
  image = Image.open(image_path).convert("RGB")
 
18
  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")