Spaces:
Sleeping
Sleeping
Update utils/basic_functions.py
Browse files- utils/basic_functions.py +1 -1
utils/basic_functions.py
CHANGED
|
@@ -39,7 +39,7 @@ def get_image(url):
|
|
| 39 |
return Image.open(BytesIO(content)).convert("RGB")
|
| 40 |
|
| 41 |
def load_model(model_name):
|
| 42 |
-
device = "cuda" if torch.
|
| 43 |
if 'llava' in model_name:
|
| 44 |
model = LlavaForConditionalGeneration.from_pretrained(
|
| 45 |
model_name,
|
|
|
|
| 39 |
return Image.open(BytesIO(content)).convert("RGB")
|
| 40 |
|
| 41 |
def load_model(model_name):
|
| 42 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 43 |
if 'llava' in model_name:
|
| 44 |
model = LlavaForConditionalGeneration.from_pretrained(
|
| 45 |
model_name,
|