Skip to content

Commit

Permalink
adding the model
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramyrahmeni committed Jun 14, 2024
1 parent 6a9d1e2 commit a988d38
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,14 @@ def ask(query, model, embedding_model, embeddings, pages_and_chunks, tokenizer,
for i, item in enumerate(context_items):
item["score"] = scores[i].cpu() # return score back to CPU

st.text(f"Context items: {context_items}")
#st.text(f"Context items: {context_items}")

# Format the prompt with context items
'''print("Formatting the prompt")
print("Formatting the prompt")
prompt = prompt_formatter(query=query, context_items=context_items, tokenizer=tokenizer)
print(f"Prompt: {prompt}")
st.text(f"Prompt: {prompt}")
# Tokenize the prompt
print("Tokenizing the prompt")
'''print("Tokenizing the prompt")
input_ids = tokenizer(prompt, return_tensors="pt").to("cpu")
print(f"Input IDs: {input_ids}")
Expand Down

0 comments on commit a988d38

Please sign in to comment.