Arjun Singh commited on
Commit ·
6c8d0db
1
Parent(s): 9bd29a8
updated tokens
Browse files11 unmodified lines1213141516171811 unmodified linesclient = InferenceClient(model=model_name,token=hugging_face_api_key)messages = [{"role": "system", "content": system_prompt},{"role": "user", "content": prompt}]tokens = ""for completion in client.chat_completion(messages, max_tokens=200, stream=True):token = completion.choices[0].delta.contenttokens += tokenyield tokens11 unmodified lines1213141516171811 unmodified linesclient = InferenceClient(model=model_name,token=hugging_face_api_key)messages = [{"role": "system", "content": system_prompt},{"role": "user", "content": prompt}]tokens = ""for completion in client.chat_completion(messages, max_tokens=500, stream=True):token = completion.choices[0].delta.contenttokens += tokenyield tokens
app.py+1-1