Nahyunho commited on
Commit
a5ddf3b
1 Parent(s): 5f24400

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -38,7 +38,13 @@ def get_text_file(docs):
38
  return text_doc
39
 
40
  def get_csv_file(docs):
41
- pass
 
 
 
 
 
 
42
 
43
  def get_json_file(docs):
44
  pass
 
38
  return text_doc
39
 
40
  def get_csv_file(docs):
41
+ with NamedTemporaryFile() as temp_file:
42
+ temp_file.write(docs.getvalue())
43
+ temp_file.seek(0)
44
+ text_loader = CSVLoader(temp_file.name)
45
+ text_doc = text_loader.load()
46
+
47
+ return text_doc
48
 
49
  def get_json_file(docs):
50
  pass