Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,29 +1,4 @@
|
|
1 |
-
import spaces
|
2 |
-
import torch
|
3 |
-
import argparse
|
4 |
-
import os
|
5 |
-
import sys
|
6 |
-
import pickle # For serializing frames
|
7 |
-
import gc
|
8 |
-
import tempfile
|
9 |
-
import subprocess
|
10 |
-
from datetime import datetime
|
11 |
-
from transformers import AutoModel, AutoTokenizer
|
12 |
-
from modelscope.hub.snapshot_download import snapshot_download
|
13 |
-
from PIL import Image
|
14 |
-
from decord import VideoReader, cpu
|
15 |
-
import cv2
|
16 |
-
import gradio as gr
|
17 |
-
from ultralytics import YOLO
|
18 |
-
import numpy as np
|
19 |
-
import io
|
20 |
|
21 |
-
# Install flash-attn (using prebuilt wheel mode if needed)
|
22 |
-
subprocess.run(
|
23 |
-
'pip install flash-attn --no-build-isolation',
|
24 |
-
env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': 'TRUE'},
|
25 |
-
shell=True
|
26 |
-
)
|
27 |
|
28 |
# --------------------------------------------------------------------
|
29 |
# Command-line arguments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# --------------------------------------------------------------------
|
4 |
# Command-line arguments
|