Spaces:
Build error
Build error
Commit ·
2694be6
1
Parent(s): 00c0d2b
update
Browse filesFiles changed (2)
151 unmodified lines15215315415515515615715815916016116216216316416516 unmodified lines182183184185186185186187188189151 unmodified lines seed = request.form.get('seed') method = request.form.get('method') if not username or not seed or not method: return render_template('index.html', error="Please fill in all fields and select a method.") return render_template('index.html', error="Please fill in all fields and select a method.", show_no_xai=False) try: seed = int(seed) random.seed(seed) all_samples = load_samples() selected_samples = select_balanced_samples(all_samples) if len(selected_samples) == 0: return render_template('index.html', error="No common samples were found") return render_template('index.html', error="No common samples were found", show_no_xai=False) start_time = datetime.now().isoformat() session_id = generate_session_id() session_data = {16 unmodified lines return redirect(url_for('explanation', session_id=session_id)) except Exception as e: logger.exception(f"Error in index route: {e}") return render_template('index.html', error="An error occurred. Please try again.") return render_template('index.html') return render_template('index.html', error="An error occurred. Please try again.", show_no_xai=False) return render_template('index.html', show_no_xai=False)
@app.route('/explanation/<session_id>')def explanation(session_id):207 unmodified lines208209210211212213214207 unmodified lines <div class="method-button Dater" onclick="selectMethod('Dater')"> Dater </div> {% if show_no_xai %} <div class="method-button No-XAI" onclick="selectMethod('No-XAI')"> No-XAI </div>app.py+4-4
templates/index.html+1