Spaces:
Runtime error
Runtime error
File size: 504 Bytes
d8152da f16d5a9 d8152da f16d5a9 d8152da f16d5a9 d8152da | 1 2 3 4 5 6 7 8 9 10 11 12 | from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
model_id = "deepseek-ai/DeepSeek-Coder-6.7B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto")
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
prompt = "Add a custom field 'fabric_type' to product admin page in OpenCart and save it to database."
result = pipe(prompt, max_new_tokens=400)
print(result[0]['generated_text'])
|