Update src/florence/model.py
Browse files- src/florence/model.py +5 -5
src/florence/model.py
CHANGED
|
@@ -14,11 +14,11 @@ from src.exception import CustomExceptionHandling
|
|
| 14 |
|
| 15 |
|
| 16 |
# Install the required dependencies
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
|
| 23 |
# Load model and processor from Hugging Face
|
| 24 |
model_id = "microsoft/Florence-2-large-ft"
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
# Install the required dependencies
|
| 17 |
+
subprocess.run(
|
| 18 |
+
"pip install flash-attn --no-build-isolation",
|
| 19 |
+
env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
|
| 20 |
+
shell=True,
|
| 21 |
+
)
|
| 22 |
|
| 23 |
# Load model and processor from Hugging Face
|
| 24 |
model_id = "microsoft/Florence-2-large-ft"
|