Upload facebook_MobileLLM-Pro_0.py with huggingface_hub
Browse files
facebook_MobileLLM-Pro_0.py
CHANGED
|
@@ -14,6 +14,10 @@ try:
|
|
| 14 |
from transformers import pipeline
|
| 15 |
|
| 16 |
pipe = pipeline("text-generation", model="facebook/MobileLLM-Pro", trust_remote_code=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
with open('facebook_MobileLLM-Pro_0.txt', 'w') as f:
|
| 18 |
f.write('Everything was good in facebook_MobileLLM-Pro_0.txt')
|
| 19 |
except Exception as e:
|
|
|
|
| 14 |
from transformers import pipeline
|
| 15 |
|
| 16 |
pipe = pipeline("text-generation", model="facebook/MobileLLM-Pro", trust_remote_code=True)
|
| 17 |
+
messages = [
|
| 18 |
+
{"role": "user", "content": "Who are you?"},
|
| 19 |
+
]
|
| 20 |
+
pipe(messages)
|
| 21 |
with open('facebook_MobileLLM-Pro_0.txt', 'w') as f:
|
| 22 |
f.write('Everything was good in facebook_MobileLLM-Pro_0.txt')
|
| 23 |
except Exception as e:
|