nickmuchi commited on
Commit
3a38384
1 Parent(s): 88cec00

Update variables.py

Browse files
Files changed (1) hide show
  1. variables.py +2 -3
variables.py CHANGED
@@ -29,7 +29,7 @@ def get_latest_file():
29
  '''Get the latest file from output folder'''
30
 
31
  # set the directory path
32
- directory_path = "output/"
33
 
34
  # create a list of all text files in the directory and sort by modification time
35
  text_files = sorted(pathlib.Path(directory_path).glob("*.txt"), key=lambda f: f.stat().st_mtime)
@@ -44,14 +44,13 @@ def get_latest_file():
44
  return file_contents
45
 
46
  @st.experimental_singleton(suppress_st_warning=True)
47
- def process_tweets(file,embed_model,query):
48
  '''Process file with latest tweets'''
49
 
50
  # Split tweets int chunks
51
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
52
  texts = text_splitter.split_text(file)
53
 
54
- model = bi_enc_dict[embed_model]
55
 
56
  if model == "hkunlp/instructor-large":
57
  emb = HuggingFaceInstructEmbeddings(model_name=model,
 
29
  '''Get the latest file from output folder'''
30
 
31
  # set the directory path
32
+ directory_path = "/output/"
33
 
34
  # create a list of all text files in the directory and sort by modification time
35
  text_files = sorted(pathlib.Path(directory_path).glob("*.txt"), key=lambda f: f.stat().st_mtime)
 
44
  return file_contents
45
 
46
  @st.experimental_singleton(suppress_st_warning=True)
47
+ def process_tweets(file,model,query):
48
  '''Process file with latest tweets'''
49
 
50
  # Split tweets int chunks
51
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
52
  texts = text_splitter.split_text(file)
53
 
 
54
 
55
  if model == "hkunlp/instructor-large":
56
  emb = HuggingFaceInstructEmbeddings(model_name=model,