Spaces:
Build error
Build error
Commit ·
51ed47e
1
Parent(s): 64921b6
update
Browse files107 unmodified lines1081091101111121131141 unmodified line11611711811912012112212312 unmodified lines136137138139140141142143144107 unmodified lineslogger.exception(f"Error in index route: {e}")return "An error occurred", 500return render_template('index.html')@app.route('/experiment/<username>/<sample_index>/<seed>/<filename>', methods=['GET'])def experiment(username, sample_index, seed, filename):try:1 unmodified lineselected_samples = session.get('selected_samples', [])method = session.get('method') # Retrieve the selected method# breakpoint()if sample_index >= len(selected_samples):return redirect(url_for('completed', filename=filename))visualization_file = selected_samples[sample_index]12 unmodified linesbreakif not visualization_path:logger.error("Visualization file not found.")return "Visualization file not found", 404statement = "Please make a decision to Accept/Reject the AI prediction based on the explanation."return render_template('experiment.html',sample_id=sample_index,107 unmodified lines1081091101111121131 unmodified line11511611711811912012112212 unmodified lines135136137138139140141142143144145107 unmodified lineslogger.exception(f"Error in index route: {e}")return "An error occurred", 500return render_template('index.html')@app.route('/experiment/<username>/<sample_index>/<seed>/<filename>', methods=['GET'])def experiment(username, sample_index, seed, filename):try:1 unmodified lineselected_samples = session.get('selected_samples', [])method = session.get('method') # Retrieve the selected methodif sample_index >= len(selected_samples):logger.error("Sample index exceeds the number of selected samples.")return redirect(url_for('completed', filename=filename))visualization_file = selected_samples[sample_index]12 unmodified linesbreakif not visualization_path:logger.error(f"Visualization file {visualization_file} not found in any category.")return "Visualization file not found", 404logger.info(f"Rendering experiment page with visualization: {visualization_path}")statement = "Please make a decision to Accept/Reject the AI prediction based on the explanation."return render_template('experiment.html',sample_id=sample_index,
app.py+4-3