Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from PIL import Image
|
|
7 |
|
8 |
model_id = "adept/fuyu-8b"
|
9 |
dtype = torch.bfloat16
|
10 |
-
device =
|
11 |
|
12 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
13 |
model = FuyuForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=dtype)
|
|
|
7 |
|
8 |
model_id = "adept/fuyu-8b"
|
9 |
dtype = torch.bfloat16
|
10 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
11 |
|
12 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
13 |
model = FuyuForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=dtype)
|