Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
import subprocess
|
|
|
|
|
|
|
| 2 |
subprocess.run('pip install flash-attn==2.7.0.post2 --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 3 |
subprocess.run('pip install gptqmodel==2.1.0', shell=True)
|
| 4 |
subprocess.run('pip install numpy==1.25.0 torch==2.4.0 transformers==4.46.2 pillow==10.3.0 moviepy==1.0.3', shell=True)
|
|
|
|
| 5 |
|
| 6 |
import spaces
|
| 7 |
-
import os
|
| 8 |
import re
|
| 9 |
import logging
|
| 10 |
from typing import List, Any
|
|
@@ -18,6 +20,7 @@ from PIL import Image
|
|
| 18 |
from gptqmodel import GPTQModel
|
| 19 |
|
| 20 |
model_name = 'AIDC-AI/Ovis2-34B-GPTQ-Int4'
|
|
|
|
| 21 |
|
| 22 |
use_thread = False
|
| 23 |
|
|
|
|
| 1 |
import subprocess
|
| 2 |
+
import os
|
| 3 |
+
os.environ['CUDA_VISIBLE_DEVICES']='0'
|
| 4 |
subprocess.run('pip install flash-attn==2.7.0.post2 --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 5 |
subprocess.run('pip install gptqmodel==2.1.0', shell=True)
|
| 6 |
subprocess.run('pip install numpy==1.25.0 torch==2.4.0 transformers==4.46.2 pillow==10.3.0 moviepy==1.0.3', shell=True)
|
| 7 |
+
os.environ['CUDA_VISIBLE_DEVICES']='0'
|
| 8 |
|
| 9 |
import spaces
|
|
|
|
| 10 |
import re
|
| 11 |
import logging
|
| 12 |
from typing import List, Any
|
|
|
|
| 20 |
from gptqmodel import GPTQModel
|
| 21 |
|
| 22 |
model_name = 'AIDC-AI/Ovis2-34B-GPTQ-Int4'
|
| 23 |
+
os.environ['CUDA_VISIBLE_DEVICES']='0'
|
| 24 |
|
| 25 |
use_thread = False
|
| 26 |
|