yasirme commited on
Commit
407c79e
·
1 Parent(s): 54155f3
Files changed (2) hide show
  1. utils/file_reader.py +1 -2
  2. utils/handle_file.py +2 -1
utils/file_reader.py CHANGED
@@ -96,5 +96,4 @@ class FileReader:
96
  text = text.strip()
97
  return text
98
 
99
- file_reader = FileReader()
100
-
 
96
  text = text.strip()
97
  return text
98
 
99
+ file_reader = FileReader()
 
utils/handle_file.py CHANGED
@@ -21,9 +21,10 @@ class HandleFiles:
21
  "name": text_dict['name'],
22
  "type": text_dict['type'],
23
  "total_chars": text_dict['total_chars'],
24
- "embedding": embedding['embeddings'],
25
  "chunks": embedding['chunks']
26
  }
 
27
  return result
28
  except Exception as e:
29
  return {"error": f"an error occured: {e}"}, 500
 
21
  "name": text_dict['name'],
22
  "type": text_dict['type'],
23
  "total_chars": text_dict['total_chars'],
24
+ "embeddings": embedding['embeddings'],
25
  "chunks": embedding['chunks']
26
  }
27
+ result['total_chars'] = content['total_chars']
28
  return result
29
  except Exception as e:
30
  return {"error": f"an error occured: {e}"}, 500