hyonee commited on
Commit
5901b4e
ยท
1 Parent(s): 2d2d20d
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -41,11 +41,12 @@ def get_text_file(text_docs):
41
 
42
  def get_csv_file(csv_docs):
43
  temp_dir = tempfile.TemporaryDirectory()
44
- temp_filepath = os.path.join(temp_dir.name, csv_docs.name)
 
45
  with open(temp_filepath, "wb") as f:
46
  f.write(csv_docs.getvalue())
 
47
  csv_loader = CSVLoader(temp_filepath)
48
- # ์˜ค๋ฅ˜ ๋ฐœ์ƒํ•ด์„œ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ ์‹ค์‹œ
49
  try:
50
  csv_content = csv_loader.load()
51
  except Exception as e:
 
41
 
42
  def get_csv_file(csv_docs):
43
  temp_dir = tempfile.TemporaryDirectory()
44
+ temp_filepath = os.path.join(temp_dir.name, "temp_file.csv")
45
+
46
  with open(temp_filepath, "wb") as f:
47
  f.write(csv_docs.getvalue())
48
+
49
  csv_loader = CSVLoader(temp_filepath)
 
50
  try:
51
  csv_content = csv_loader.load()
52
  except Exception as e: