Upload PokeeAI_pokee_research_7b_0.py with huggingface_hub
Browse files
PokeeAI_pokee_research_7b_0.py
CHANGED
|
@@ -11,7 +11,14 @@
|
|
| 11 |
# ///
|
| 12 |
|
| 13 |
try:
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
with open('PokeeAI_pokee_research_7b_0.txt', 'w', encoding='utf-8') as f:
|
| 16 |
f.write('Everything was good in PokeeAI_pokee_research_7b_0.txt')
|
| 17 |
except Exception as e:
|
|
@@ -26,7 +33,14 @@ except Exception as e:
|
|
| 26 |
with open('PokeeAI_pokee_research_7b_0.txt', 'a', encoding='utf-8') as f:
|
| 27 |
import traceback
|
| 28 |
f.write('''```CODE:
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
```
|
| 31 |
|
| 32 |
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="PokeeAI/pokee_research_7b")
|
| 18 |
+
messages = [
|
| 19 |
+
{"role": "user", "content": "Who are you?"},
|
| 20 |
+
]
|
| 21 |
+
pipe(messages)
|
| 22 |
with open('PokeeAI_pokee_research_7b_0.txt', 'w', encoding='utf-8') as f:
|
| 23 |
f.write('Everything was good in PokeeAI_pokee_research_7b_0.txt')
|
| 24 |
except Exception as e:
|
|
|
|
| 33 |
with open('PokeeAI_pokee_research_7b_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="PokeeAI/pokee_research_7b")
|
| 40 |
+
messages = [
|
| 41 |
+
{"role": "user", "content": "Who are you?"},
|
| 42 |
+
]
|
| 43 |
+
pipe(messages)
|
| 44 |
```
|
| 45 |
|
| 46 |
ERROR:
|