Spaces:
Runtime error
Runtime error
Update functions.py
Browse files- functions.py +3 -0
functions.py
CHANGED
|
@@ -4,6 +4,9 @@ from parler_tts import ParlerTTSForConditionalGeneration
|
|
| 4 |
import torch
|
| 5 |
import soundfile as sf
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
def generate_image_caption(image_path):
|
| 8 |
|
| 9 |
model_name = "microsoft/Florence-2-large"
|
|
|
|
| 4 |
import torch
|
| 5 |
import soundfile as sf
|
| 6 |
|
| 7 |
+
import subprocess
|
| 8 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 9 |
+
|
| 10 |
def generate_image_caption(image_path):
|
| 11 |
|
| 12 |
model_name = "microsoft/Florence-2-large"
|