aquibmoin commited on
Commit
26a842a
1 Parent(s): 28f64d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -47,7 +47,7 @@ def split_into_chunks(text, chunk_size=100):
47
 
48
  def semantic_search(query, file):
49
  if file is not None:
50
- document = file.encode('utf-8')
51
  chunks = split_into_chunks(document)
52
  response = query_similarity(query, chunks)
53
  return format_output(response)
 
47
 
48
  def semantic_search(query, file):
49
  if file is not None:
50
+ document = file.read()
51
  chunks = split_into_chunks(document)
52
  response = query_similarity(query, chunks)
53
  return format_output(response)