Spaces:
Sleeping
Sleeping
Update run.py
Browse files
run.py
CHANGED
@@ -37,12 +37,13 @@ def fast_caption(sys_prompt, usr_prompt, temp, top_p, max_tokens, model, key, en
|
|
37 |
all_captions = []
|
38 |
with tempfile.NamedTemporaryFile(mode='w+t', delete=True) as temp_parquet_file:
|
39 |
temp_parquet_file = hf_hub_download(
|
40 |
-
repo_id=
|
41 |
filename="data/β + str(number).zfill(6) + β.parquet",
|
42 |
repo_type="dataset",
|
43 |
token=video_hf_auth,
|
44 |
)
|
45 |
parquet_path = temp_parquet_file.name
|
|
|
46 |
parquet_file = pq.ParquetFile(parquet_path)
|
47 |
|
48 |
for batch in parquet_file.iter_batches(batch_size=1):
|
@@ -53,6 +54,7 @@ def fast_caption(sys_prompt, usr_prompt, temp, top_p, max_tokens, model, key, en
|
|
53 |
with tempfile.NamedTemporaryFile(mode='w+t', delete=True) as temp_video_file:
|
54 |
temp_video_file.write(video)
|
55 |
video_path = temp_video_file.name
|
|
|
56 |
|
57 |
processor = VideoProcessor(frame_format=frame_format, frame_limit=frame_limit)
|
58 |
frames = processor._decode(video_path)
|
|
|
37 |
all_captions = []
|
38 |
with tempfile.NamedTemporaryFile(mode='w+t', delete=True) as temp_parquet_file:
|
39 |
temp_parquet_file = hf_hub_download(
|
40 |
+
repo_id=video_hf,
|
41 |
filename="data/β + str(number).zfill(6) + β.parquet",
|
42 |
repo_type="dataset",
|
43 |
token=video_hf_auth,
|
44 |
)
|
45 |
parquet_path = temp_parquet_file.name
|
46 |
+
print(parquet_path)
|
47 |
parquet_file = pq.ParquetFile(parquet_path)
|
48 |
|
49 |
for batch in parquet_file.iter_batches(batch_size=1):
|
|
|
54 |
with tempfile.NamedTemporaryFile(mode='w+t', delete=True) as temp_video_file:
|
55 |
temp_video_file.write(video)
|
56 |
video_path = temp_video_file.name
|
57 |
+
print(video_path)
|
58 |
|
59 |
processor = VideoProcessor(frame_format=frame_format, frame_limit=frame_limit)
|
60 |
frames = processor._decode(video_path)
|