-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
the following code does not work !
import requests
import torch
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("q-future/one-align", trust_remote_code=True,
torch_dtype=torch.float16, device_map="auto")
from PIL import Image
model.score([Image.open(requests.get("https://raw.githubusercontent.com/Q-Future/Q-Align/main/fig/singapore_flyer.jpg",
stream=True).raw)], task_="quality", input_="image") # task_ : quality | aesthetics; # input_: image | video
the error is as following:
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like q-future/one-align is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels