CoolFace
Apppublic

netajich/cti

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
app.py44 linesDownload Raw Back to root
1from flask import Flask, request, render_template2from functions import *3 4 5gemini = create_model()6 7app = Flask(__name__)8 9 10@app.route('/')11def home():12    return render_template('index.html')13 14@app.route('/threats')15def threats():16    return render_template('threats.html')17 18@app.route('/about')19def about():20    return render_template('about.html')21 22@app.route('/team')23def team():24    return render_template('team.html')25 26@app.route('/login')27def login():28    return render_template('login.html')29 30# @app.route('/upload', methods=['POST'])31# def upload_file():32#     if 'file' not in request.files:33#         return "No file part"34#     file = request.files['file']35#     if file.filename == '':36#         return "No selected file"37#     text = extract_text_from_pdf(file)38#     json_response = generate_json(model=gemini, extracted_data=text)39#     return format_json(json_response)40 41 42if __name__ == '__main__':43    app.run(debug=True)44