Spaces:
Sleeping
Sleeping
chrisx599
commited on
Commit
·
b4966a6
1
Parent(s):
6e8fdc7
update
Browse files- .gitignore +2 -1
- app.py +4 -2
- serve/__pycache__/__init__.cpython-310.pyc +0 -0
- serve/__pycache__/chat_utils.cpython-310.pyc +0 -0
- serve/__pycache__/examples.cpython-310.pyc +0 -0
- serve/__pycache__/frontend.cpython-310.pyc +0 -0
- serve/__pycache__/gradio_utils.cpython-310.pyc +0 -0
- serve/__pycache__/utils.cpython-310.pyc +0 -0
- serve/chat_utils.py +2 -2
.gitignore
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
logs
|
| 2 |
effi.py
|
| 3 |
-
wo_effi.py
|
|
|
|
|
|
| 1 |
logs
|
| 2 |
effi.py
|
| 3 |
+
wo_effi.py
|
| 4 |
+
*.sh
|
app.py
CHANGED
|
@@ -37,7 +37,6 @@ def parse_args():
|
|
| 37 |
parser.add_argument(
|
| 38 |
"--local-path",
|
| 39 |
type=str,
|
| 40 |
-
default="/share/project/minghao/Share_1/Models/Video-XL-2",
|
| 41 |
help="huggingface ckpt, optional",
|
| 42 |
)
|
| 43 |
parser.add_argument("--ip", type=str, default="0.0.0.0")
|
|
@@ -48,7 +47,10 @@ def parse_args():
|
|
| 48 |
def fetch_model(model_name: str):
|
| 49 |
global DEPLOY_MODELS
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
if model_name in DEPLOY_MODELS:
|
| 54 |
model_info = DEPLOY_MODELS[model_name]
|
|
|
|
| 37 |
parser.add_argument(
|
| 38 |
"--local-path",
|
| 39 |
type=str,
|
|
|
|
| 40 |
help="huggingface ckpt, optional",
|
| 41 |
)
|
| 42 |
parser.add_argument("--ip", type=str, default="0.0.0.0")
|
|
|
|
| 47 |
def fetch_model(model_name: str):
|
| 48 |
global DEPLOY_MODELS
|
| 49 |
|
| 50 |
+
if args.local_path:
|
| 51 |
+
local_model_path = args.local_path
|
| 52 |
+
else:
|
| 53 |
+
local_model_path = 'BAAI/Video-XL-2'
|
| 54 |
|
| 55 |
if model_name in DEPLOY_MODELS:
|
| 56 |
model_info = DEPLOY_MODELS[model_name]
|
serve/__pycache__/__init__.cpython-310.pyc
CHANGED
|
Binary files a/serve/__pycache__/__init__.cpython-310.pyc and b/serve/__pycache__/__init__.cpython-310.pyc differ
|
|
|
serve/__pycache__/chat_utils.cpython-310.pyc
CHANGED
|
Binary files a/serve/__pycache__/chat_utils.cpython-310.pyc and b/serve/__pycache__/chat_utils.cpython-310.pyc differ
|
|
|
serve/__pycache__/examples.cpython-310.pyc
CHANGED
|
Binary files a/serve/__pycache__/examples.cpython-310.pyc and b/serve/__pycache__/examples.cpython-310.pyc differ
|
|
|
serve/__pycache__/frontend.cpython-310.pyc
CHANGED
|
Binary files a/serve/__pycache__/frontend.cpython-310.pyc and b/serve/__pycache__/frontend.cpython-310.pyc differ
|
|
|
serve/__pycache__/gradio_utils.cpython-310.pyc
CHANGED
|
Binary files a/serve/__pycache__/gradio_utils.cpython-310.pyc and b/serve/__pycache__/gradio_utils.cpython-310.pyc differ
|
|
|
serve/__pycache__/utils.cpython-310.pyc
CHANGED
|
Binary files a/serve/__pycache__/utils.cpython-310.pyc and b/serve/__pycache__/utils.cpython-310.pyc differ
|
|
|
serve/chat_utils.py
CHANGED
|
@@ -27,8 +27,8 @@ import imageio
|
|
| 27 |
def compress_video_to_base64(
|
| 28 |
video_path: str,
|
| 29 |
max_frames: int = 600,
|
| 30 |
-
resolution: tuple = (
|
| 31 |
-
target_crf: int =
|
| 32 |
) -> str:
|
| 33 |
cap = cv2.VideoCapture(video_path)
|
| 34 |
if not cap.isOpened():
|
|
|
|
| 27 |
def compress_video_to_base64(
|
| 28 |
video_path: str,
|
| 29 |
max_frames: int = 600,
|
| 30 |
+
resolution: tuple = (280, 240),
|
| 31 |
+
target_crf: int = 51
|
| 32 |
) -> str:
|
| 33 |
cap = cv2.VideoCapture(video_path)
|
| 34 |
if not cap.isOpened():
|