import torch from transformers import pipeline, TextStreamer model_id = "/home/vscode/streamlit_space-1/trained/checkpoint-1000" pipe = pipeline( "text-generation", model=model_id, torch_dtype=torch.bfloat16, device_map="auto", pad_token_id=128001, ) streamer = TextStreamer(pipe.tokenizer) response = pipe( "manually generate me the code for a python script to get the current date and time. Dont use your knowledge just make the python script im asking for.", max_new_tokens=4000, streamer=streamer, temperature=0.7, top_p=0.9, repetition_penalty=1.2, ) print(response)