WebashalarForML commited on
Commit
2fa9193
·
verified ·
1 Parent(s): 7dde793

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -70,6 +70,7 @@ def upload_file():
70
  try:
71
  if request.method == 'POST':
72
  if 'file' not in request.files:
 
73
  flash('No file part', 'error')
74
  return render_template('upload.html') # Avoid redirect loop
75
 
@@ -80,7 +81,9 @@ def upload_file():
80
 
81
  if file and allowed_file(file.filename):
82
  filename = secure_filename(file.filename)
 
83
  file_path = os.path.join(app.config['UPLOAD_FOLDER'], filename)
 
84
  file.save(file_path)
85
 
86
  # Handle non-JSON files
 
70
  try:
71
  if request.method == 'POST':
72
  if 'file' not in request.files:
73
+ print("the file 1 ",file)
74
  flash('No file part', 'error')
75
  return render_template('upload.html') # Avoid redirect loop
76
 
 
81
 
82
  if file and allowed_file(file.filename):
83
  filename = secure_filename(file.filename)
84
+ print("the file 1 ",filename)
85
  file_path = os.path.join(app.config['UPLOAD_FOLDER'], filename)
86
+ print("the file path ",file_path)
87
  file.save(file_path)
88
 
89
  # Handle non-JSON files