Spaces:
Build error
Build error
Commit ·
678720e
1
Parent(s): ea1f759
update
Browse filesFiles changed (2)
152 unmodified lines15315415515615715815916016 unmodified lines177178179178179180181182180181182183184186185186187188152 unmodified lines 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.") if method not in ['Chain-of-Table', 'Plan-of-SQLs', 'Dater']: return render_template('index.html', error="Invalid method selected.") try: seed = int(seed) random.seed(seed)16 unmodified lines save_session_data(session_id, session_data) logger.info(f"Session data stored for user {username}, method {method}, session_id {session_id}")
# Redirect based on the selected method if method == 'No-XAI': return redirect(url_for('experiment', session_id=session_id)) else: return redirect(url_for('explanation', session_id=session_id)) # Redirect to explanation for all methods 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', 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+5-6
templates/index.html+1