demetz commited on
Commit
e2a9ab1
·
verified ·
1 Parent(s): 7d55b61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,12 +3,13 @@ from huggingface_hub import InferenceClient
3
  from sentence_transformers import SentenceTransformer
4
  import torch
5
 
6
-
7
  with open("knowledge.txt", "r", encoding="utf-8") as file:
8
  knowledge = file.read()
9
 
10
  print(knowledge)
11
 
 
12
  cleaned_chunks = [chunk.strip() for chunk in knowledge.strip().split("\n") if chunk.strip()]
13
  print(cleaned_chunks)
14
 
 
3
  from sentence_transformers import SentenceTransformer
4
  import torch
5
 
6
+ # ✅✅✅ change data to match their project
7
  with open("knowledge.txt", "r", encoding="utf-8") as file:
8
  knowledge = file.read()
9
 
10
  print(knowledge)
11
 
12
+ # ✅✅✅ Change \n to wherever you want the text file to be broken into chunks
13
  cleaned_chunks = [chunk.strip() for chunk in knowledge.strip().split("\n") if chunk.strip()]
14
  print(cleaned_chunks)
15