Skip to content

Instantly share code, notes, and snippets.

View Raman1121's full-sized avatar

Raman Dutt Raman1121

View GitHub Profile
@Raman1121
Raman1121 / llava_med_inference.py
Last active April 9, 2024 13:50
Running inference on a single image using LLaVA-Med
# From: https://github.com/microsoft/LLaVA-Med/blob/main/llava/eval/model_vqa_med.py
import argparse
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
import torch
import os
import json
from tqdm import tqdm
import shortuuid