Hey guys, so my website fails to load now
It happened after I updated my flask code to read data from a spreadsheet. Here is the code & spreadsheet:
from flask import Flask, request, render_template
import pandas as pd
app = Flask(__name__)
# Load the master spreadsheet
df = pd.read_csv(r'/home/Walt1000/Strain Data(1).csv') # Ensure the filename matches your uploaded CSV
@app.route('/')
def index():
# Extract desired states from the columns (excluding 'Strain Name')
desired_states = df.columns.tolist()
desired_states.remove('Strain Name')
return render_template('main_page.html', desired_states=desired_states)
@app.route('/submit', methods=['POST'])
def submit():
try:
print("
[edit by admin: formatting]