Spaces:
Running
on
T4
Running
on
T4
[email protected]
commited on
Commit
·
750f1e0
1
Parent(s):
29f706c
miss fix
Browse files
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
main.py
CHANGED
@@ -42,6 +42,9 @@ import torch
|
|
42 |
# Check if CUDA is available
|
43 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
44 |
dtype = torch.float16 if device == "cuda" else torch.float32 # Use float32 on CPU
|
|
|
|
|
|
|
45 |
|
46 |
try:
|
47 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
42 |
# Check if CUDA is available
|
43 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
44 |
dtype = torch.float16 if device == "cuda" else torch.float32 # Use float32 on CPU
|
45 |
+
processor = AutoProcessor.from_pretrained(
|
46 |
+
"microsoft/Florence-2-base", trust_remote_code=True
|
47 |
+
)
|
48 |
|
49 |
try:
|
50 |
model = AutoModelForCausalLM.from_pretrained(
|