Spaces:
Build error
Build error
Commit ·
51ed47e
1
Parent(s): 64921b6
update
Browse files107 unmodified lines1081091101111111121131 unmodified line11511611711911811912012112212 unmodified lines135136137139138139140141142143144145107 unmodified lines logger.exception(f"Error in index route: {e}") return "An error occurred", 500 return render_template('index.html')
@app.route('/experiment/<username>/<sample_index>/<seed>/<filename>', methods=['GET'])def experiment(username, sample_index, seed, filename): try:1 unmodified line selected_samples = session.get('selected_samples', []) method = session.get('method') # Retrieve the selected method
# breakpoint() if 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 lines break
if not visualization_path: logger.error("Visualization file not found.") logger.error(f"Visualization file {visualization_file} not found in any category.") return "Visualization file not found", 404
logger.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