WebashalarForML commited on
Commit
8d2eaad
·
verified ·
1 Parent(s): 2fa9193

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -85,6 +85,7 @@ def upload_file():
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
90
  if not filename.lower().endswith('.json'):
@@ -107,11 +108,12 @@ def process_other_files(file_path, filename):
107
  cleaned_text = preprocess_text(extracted_text)
108
 
109
  resume_file_path = os.path.join(app.config['DATA_FOLDER'], 'resume_text.txt')
110
-
111
  with open(resume_file_path, 'w', encoding='utf-8') as f:
112
  f.write(cleaned_text)
113
 
114
  session['uploaded_file'] = filename
 
115
  return render_template('text.html', text=cleaned_text)
116
  except Exception as e:
117
  flash(f"Error processing file {filename}: {str(e)}", 'error')
 
85
  file_path = os.path.join(app.config['UPLOAD_FOLDER'], filename)
86
  print("the file path ",file_path)
87
  file.save(file_path)
88
+ print("file save in folder")
89
 
90
  # Handle non-JSON files
91
  if not filename.lower().endswith('.json'):
 
108
  cleaned_text = preprocess_text(extracted_text)
109
 
110
  resume_file_path = os.path.join(app.config['DATA_FOLDER'], 'resume_text.txt')
111
+ print("text file path",resume_file_path)
112
  with open(resume_file_path, 'w', encoding='utf-8') as f:
113
  f.write(cleaned_text)
114
 
115
  session['uploaded_file'] = filename
116
+ print("save in txt file")
117
  return render_template('text.html', text=cleaned_text)
118
  except Exception as e:
119
  flash(f"Error processing file {filename}: {str(e)}", 'error')