Upload MiniMaxAI_MiniMax-M2_0.py with huggingface_hub
Browse files- MiniMaxAI_MiniMax-M2_0.py +2 -16
MiniMaxAI_MiniMax-M2_0.py
CHANGED
|
@@ -11,14 +11,7 @@
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
-
|
| 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 |
-
|
| 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:
|