ariG23498 HF Staff commited on
Commit
5ebd672
·
verified ·
1 Parent(s): 46864e0

Upload MiniMaxAI_MiniMax-M2_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. MiniMaxAI_MiniMax-M2_0.py +2 -16
MiniMaxAI_MiniMax-M2_0.py CHANGED
@@ -11,14 +11,7 @@
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="MiniMaxAI/MiniMax-M2")
18
- messages = [
19
- {"role": "user", "content": "Who are you?"},
20
- ]
21
- pipe(messages)
22
  with open('MiniMaxAI_MiniMax-M2_0.txt', 'w', encoding='utf-8') as f:
23
  f.write('Everything was good in MiniMaxAI_MiniMax-M2_0.txt')
24
  except Exception as e:
@@ -33,14 +26,7 @@ except Exception as e:
33
  with open('MiniMaxAI_MiniMax-M2_0.txt', 'a', encoding='utf-8') as f:
34
  import traceback
35
  f.write('''```CODE:
36
- # Use a pipeline as a high-level helper
37
- from transformers import pipeline
38
-
39
- pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2")
40
- messages = [
41
- {"role": "user", "content": "Who are you?"},
42
- ]
43
- pipe(messages)
44
  ```
45
 
46
  ERROR:
 
11
  # ///
12
 
13
  try:
14
+ !pip install -U transformers
 
 
 
 
 
 
 
15
  with open('MiniMaxAI_MiniMax-M2_0.txt', 'w', encoding='utf-8') as f:
16
  f.write('Everything was good in MiniMaxAI_MiniMax-M2_0.txt')
17
  except Exception as e:
 
26
  with open('MiniMaxAI_MiniMax-M2_0.txt', 'a', encoding='utf-8') as f:
27
  import traceback
28
  f.write('''```CODE:
29
+ !pip install -U transformers
 
 
 
 
 
 
 
30
  ```
31
 
32
  ERROR: