rwayz commited on
Commit
74c2e66
·
1 Parent(s): 12866ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -71,8 +71,6 @@ def create_engine_and_load_db(csv_path, sql_db_path):
71
  def handle_csv_upload(file):
72
  global engine, db
73
  try:
74
- with open(UPLOADED_CSV_PATH, "wb") as f:
75
- f.write(file.read())
76
  logging.info(f"[UPLOAD] CSV salvo como: {UPLOADED_CSV_PATH}")
77
  engine = create_engine_and_load_db(UPLOADED_CSV_PATH, SQL_DB_PATH)
78
  db = SQLDatabase(engine=engine)
 
71
  def handle_csv_upload(file):
72
  global engine, db
73
  try:
 
 
74
  logging.info(f"[UPLOAD] CSV salvo como: {UPLOADED_CSV_PATH}")
75
  engine = create_engine_and_load_db(UPLOADED_CSV_PATH, SQL_DB_PATH)
76
  db = SQLDatabase(engine=engine)