braindeck commited on
Commit ·
e9a67af
1
Parent(s): bcdf9fa
Update app.py to use fine-tuned model
Browse files3 unmodified lines45678910113 unmodified linesimport torch# Load the model and tokenizertokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-7B", trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-7B", trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto")def generate_response(prompt):"""3 unmodified lines45678910113 unmodified linesimport torch# Load the model and tokenizertokenizer = AutoTokenizer.from_pretrained("braindeck/text2text", trust_remote_code=True, subfolder="checkpoints/model")model = AutoModelForCausalLM.from_pretrained("braindeck/text2text", trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto", subfolder="checkpoints/model")def generate_response(prompt):"""
app.py+2-2