ariG23498 HF Staff commited on
Commit
5c71029
·
verified ·
1 Parent(s): 0eb9def

Upload RUC-DataLab_DeepAnalyze-8B_1.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. RUC-DataLab_DeepAnalyze-8B_1.py +8 -6
RUC-DataLab_DeepAnalyze-8B_1.py CHANGED
@@ -11,9 +11,10 @@
11
  # ///
12
 
13
  try:
14
- # Load model directly
15
- from transformers import AutoModel
16
- model = AutoModel.from_pretrained("RUC-DataLab/DeepAnalyze-8B", torch_dtype="auto")
 
17
  with open('RUC-DataLab_DeepAnalyze-8B_1.txt', 'w', encoding='utf-8') as f:
18
  f.write('Everything was good in RUC-DataLab_DeepAnalyze-8B_1.txt')
19
  except Exception as e:
@@ -28,9 +29,10 @@ except Exception as e:
28
  with open('RUC-DataLab_DeepAnalyze-8B_1.txt', 'a', encoding='utf-8') as f:
29
  import traceback
30
  f.write('''```CODE:
31
- # Load model directly
32
- from transformers import AutoModel
33
- model = AutoModel.from_pretrained("RUC-DataLab/DeepAnalyze-8B", torch_dtype="auto")
 
34
  ```
35
 
36
  ERROR:
 
11
  # ///
12
 
13
  try:
14
+ # Use a pipeline as a high-level helper
15
+ from transformers import pipeline
16
+
17
+ pipe = pipeline("text-generation", model="RUC-DataLab/DeepAnalyze-8B")
18
  with open('RUC-DataLab_DeepAnalyze-8B_1.txt', 'w', encoding='utf-8') as f:
19
  f.write('Everything was good in RUC-DataLab_DeepAnalyze-8B_1.txt')
20
  except Exception as e:
 
29
  with open('RUC-DataLab_DeepAnalyze-8B_1.txt', 'a', encoding='utf-8') as f:
30
  import traceback
31
  f.write('''```CODE:
32
+ # Use a pipeline as a high-level helper
33
+ from transformers import pipeline
34
+
35
+ pipe = pipeline("text-generation", model="RUC-DataLab/DeepAnalyze-8B")
36
  ```
37
 
38
  ERROR: