Upload Ovis-U1-3B_0.py with huggingface_hub
Browse files- Ovis-U1-3B_0.py +5 -5
Ovis-U1-3B_0.py
CHANGED
@@ -10,17 +10,17 @@ try:
|
|
10 |
# Load model directly
|
11 |
from transformers import AutoModelForCausalLM
|
12 |
model = AutoModelForCausalLM.from_pretrained("AIDC-AI/Ovis-U1-3B", trust_remote_code=True)
|
13 |
-
with open('
|
14 |
-
f.write('Everything was good in
|
15 |
except Exception as e:
|
16 |
-
with open('
|
17 |
import traceback
|
18 |
traceback.print_exc(file=f)
|
19 |
finally:
|
20 |
from huggingface_hub import upload_file
|
21 |
upload_file(
|
22 |
-
path_or_fileobj='
|
23 |
repo_id='model-metadata/custom_code_execution_files',
|
24 |
-
path_in_repo='
|
25 |
repo_type='dataset',
|
26 |
)
|
|
|
10 |
# Load model directly
|
11 |
from transformers import AutoModelForCausalLM
|
12 |
model = AutoModelForCausalLM.from_pretrained("AIDC-AI/Ovis-U1-3B", trust_remote_code=True)
|
13 |
+
with open('Ovis-U1-3B_0.txt', 'w') as f:
|
14 |
+
f.write('Everything was good in Ovis-U1-3B_0')
|
15 |
except Exception as e:
|
16 |
+
with open('Ovis-U1-3B_0.txt', 'w') as f:
|
17 |
import traceback
|
18 |
traceback.print_exc(file=f)
|
19 |
finally:
|
20 |
from huggingface_hub import upload_file
|
21 |
upload_file(
|
22 |
+
path_or_fileobj='Ovis-U1-3B_0.txt',
|
23 |
repo_id='model-metadata/custom_code_execution_files',
|
24 |
+
path_in_repo='Ovis-U1-3B_0.txt',
|
25 |
repo_type='dataset',
|
26 |
)
|