Spaces:
Runtime error
Runtime error
Update run.py
Browse files
run.py
CHANGED
@@ -27,7 +27,8 @@ def fast_caption(sys_prompt, usr_prompt, temp, top_p, max_tokens, model, key, en
|
|
27 |
progress_info = []
|
28 |
with tempfile.TemporaryDirectory() as temp_dir:
|
29 |
# temp_dir = '/opt/run'
|
30 |
-
csv_filename = os.path.join(temp_dir, 'caption.csv')
|
|
|
31 |
print(csv_filename)
|
32 |
with open(csv_filename, mode='w', newline='') as csv_file:
|
33 |
fieldnames = ['md5', 'caption']
|
@@ -42,7 +43,7 @@ def fast_caption(sys_prompt, usr_prompt, temp, top_p, max_tokens, model, key, en
|
|
42 |
repo_id=video_hf,
|
43 |
filename='data/' + str(parquet_index).zfill(6) + '.parquet',
|
44 |
repo_type="dataset",
|
45 |
-
|
46 |
token=video_hf_auth,
|
47 |
)
|
48 |
|
|
|
27 |
progress_info = []
|
28 |
with tempfile.TemporaryDirectory() as temp_dir:
|
29 |
# temp_dir = '/opt/run'
|
30 |
+
# csv_filename = os.path.join(temp_dir, 'caption.csv')
|
31 |
+
csv_filename = '/dev/shm/caption.csv'
|
32 |
print(csv_filename)
|
33 |
with open(csv_filename, mode='w', newline='') as csv_file:
|
34 |
fieldnames = ['md5', 'caption']
|
|
|
43 |
repo_id=video_hf,
|
44 |
filename='data/' + str(parquet_index).zfill(6) + '.parquet',
|
45 |
repo_type="dataset",
|
46 |
+
local_dir="/dev/shm",
|
47 |
token=video_hf_auth,
|
48 |
)
|
49 |
|