Spaces:
Runtime error
Runtime error
Update app.py for v1
Browse files- app.py +5 -3
- requirements.txt +11 -7
app.py
CHANGED
|
@@ -34,10 +34,11 @@ from egogpt.constants import (
|
|
| 34 |
DEFAULT_SPEECH_TOKEN
|
| 35 |
)
|
| 36 |
from egogpt.conversation import conv_templates, SeparatorStyle
|
| 37 |
-
|
| 38 |
|
| 39 |
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-109k-release"
|
| 40 |
-
pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-EgoLife-Demo"
|
|
|
|
| 41 |
device = "cuda"
|
| 42 |
device_map = "cuda"
|
| 43 |
|
|
@@ -91,7 +92,8 @@ bibtext = """
|
|
| 91 |
```
|
| 92 |
"""
|
| 93 |
|
| 94 |
-
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
| 95 |
|
| 96 |
|
| 97 |
def time_to_frame_idx(time_int: int, fps: int) -> int:
|
|
|
|
| 34 |
DEFAULT_SPEECH_TOKEN
|
| 35 |
)
|
| 36 |
from egogpt.conversation import conv_templates, SeparatorStyle
|
| 37 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
| 38 |
|
| 39 |
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-109k-release"
|
| 40 |
+
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-EgoLife-Demo"
|
| 41 |
+
pretrained = '/EgoLife-v1/EgoGPT'
|
| 42 |
device = "cuda"
|
| 43 |
device_map = "cuda"
|
| 44 |
|
|
|
|
| 92 |
```
|
| 93 |
"""
|
| 94 |
|
| 95 |
+
# cur_dir = os.path.dirname(os.path.abspath(__file__))
|
| 96 |
+
cur_dir = ''
|
| 97 |
|
| 98 |
|
| 99 |
def time_to_frame_idx(time_int: int, fps: int) -> int:
|
requirements.txt
CHANGED
|
@@ -1,7 +1,11 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch>=2.0.0
|
| 2 |
+
numpy>=1.23.0
|
| 3 |
+
uvicorn>=0.22.0
|
| 4 |
+
librosa>=0.10.0
|
| 5 |
+
whisper>=1.0.0
|
| 6 |
+
requests>=2.31.0
|
| 7 |
+
fastapi>=0.95.0
|
| 8 |
+
pydantic>=1.10.0
|
| 9 |
+
decord>=0.6.0
|
| 10 |
+
gradio>=3.0.0
|
| 11 |
+
transformers>=4.30.0
|