hyonee commited on
Commit
c92d468
ยท
1 Parent(s): cbfbc38
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -46,6 +46,14 @@ def get_csv_file(csv_docs):
46
  f.write(csv_docs.getvalue())
47
  csv_loader = CSVLoader(temp_filepath)
48
  csv_content = csv_loader.load()
 
 
 
 
 
 
 
 
49
  temp_dir.cleanup()
50
  return csv_content
51
 
 
46
  f.write(csv_docs.getvalue())
47
  csv_loader = CSVLoader(temp_filepath)
48
  csv_content = csv_loader.load()
49
+ temp_dir.cleanup()
50
+ # ์˜ค๋ฅ˜ ๋ฐœ์ƒํ•ด์„œ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ ์‹ค์‹œ
51
+ try:
52
+ csv_content = csv_loader.load()
53
+ except Exception as e:
54
+ print(f"Error loading CSV file: {e}")
55
+ csv_content = None
56
+
57
  temp_dir.cleanup()
58
  return csv_content
59