radio / app.py
gheinrich's picture
Create app.py
8b56af0 verified
raw
history blame
365 Bytes
from einops import rearrange
import gradio as gr
import torch
import torch.nn.functional as F
from PIL import Image, ImageOps
from transformers import AutoModel, CLIPImageProcessor
hf_repo = "nvidia/RADIO-L"
image_processor = CLIPImageProcessor.from_pretrained(hf_repo)
model = AutoModel.from_pretrained(hf_repo, trust_remote_code=True)
model.eval().cuda()