Spaces:
Sleeping
Sleeping
Update app.py
Browse files6 unmodified lines789101011121327 unmodified lines41424344444546476 unmodified lines
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
# Step 1: Load the knowledge base# Step 1with open("Untitled document.txt", "r", encoding="utf-8") as f: skincare_text = f.read()
27 unmodified lines top_indices = torch.topk(similarities, k=top_k).indices return [text_chunks[i] for i in top_indices]
# Step 5: Test the workflow with sample queries# Step 5: Testsqueries = [ "Consistent skincare routine", "Applying sunscreen daily", app.py+2-2