ariG23498 HF Staff commited on
Commit
80ec5f1
·
verified ·
1 Parent(s): 1f6f5a4

Upload facebook_MobileLLM-Pro_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. facebook_MobileLLM-Pro_0.py +4 -0
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: