Download Chatbot from Kashmore84/4dptver01: direct link, hf CLI and curl.
- Browser
- Download file 211 Bytes
-
https://huggingface.co/Kashmore84/4dptver01/resolve/main/Chatbot
- Command line
-
hf download hf://Kashmore84/4dptver01/Chatbot
-
curl -L -o Chatbot https://huggingface.co/Kashmore84/4dptver01/resolve/main/Chatbot
211 Bytes
| def chat(prompt): | |
| input_ids = tokenizer(prompt, return_tensors="pt").input_ids | |
| outputs = model.generate(input_ids, max_length=50, num_beams=5) | |
| return tokenizer.decode(outputs[0], skip_special_tokens=True) | |