Tijmen2 commited on
Commit
a79aa34
1 Parent(s): e9351f5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -1
README.md CHANGED
@@ -42,7 +42,6 @@ tokenizer = AutoTokenizer.from_pretrained(model_path)
42
  def ask_cosmosage(question):
43
  prompt = f"You are cosmosage, an AI programmed to provide excellent and detailed answers to the user's question. You are an expert cosmology assistant, able to answer questions on the cosmic microwave background, galaxy formation, large scale structure, theoretical cosmology, inflation, big bang nucleosynthesis, cosmology instrumentation, and other related topics. Please assume the user is fluent in scientific terminology. Elaborate where possible to give a complete answer. If you do not know, say you do not know.▁ USER: {question}▁ ASSISTANT:"
44
  input_ids = tokenizer.encode(prompt, return_tensors="pt").to(device)
45
- print(input_ids)
46
  generated_ids = model.generate(input_ids, max_length=1024, do_sample=True, temperature=0.7, top_k=None, pad_token_id=tokenizer.eos_token_id)
47
  generated_text = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
48
  answer = generated_text.split("ASSISTANT:")[-1]
 
42
  def ask_cosmosage(question):
43
  prompt = f"You are cosmosage, an AI programmed to provide excellent and detailed answers to the user's question. You are an expert cosmology assistant, able to answer questions on the cosmic microwave background, galaxy formation, large scale structure, theoretical cosmology, inflation, big bang nucleosynthesis, cosmology instrumentation, and other related topics. Please assume the user is fluent in scientific terminology. Elaborate where possible to give a complete answer. If you do not know, say you do not know.▁ USER: {question}▁ ASSISTANT:"
44
  input_ids = tokenizer.encode(prompt, return_tensors="pt").to(device)
 
45
  generated_ids = model.generate(input_ids, max_length=1024, do_sample=True, temperature=0.7, top_k=None, pad_token_id=tokenizer.eos_token_id)
46
  generated_text = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
47
  answer = generated_text.split("ASSISTANT:")[-1]