Spaces:
Runtime error
Runtime error
from flask import Flask,redirect,url_for | |
from flask import Flask, jsonify, render_template, request, stream_with_context, Response | |
from flask_cors import CORS | |
import requests | |
app = Flask(__name__) | |
CORS(app) | |
def welc(): | |
return 'Main page ' | |
# @app.route('/fail/<int:marks>') | |
# def fail(score): | |
# return 'failure' | |
# @app.route('/success/<int:marks>') | |
# def success(score): | |
# return 'success' | |
def results(marks): | |
if marks>36: | |
result='Passed' | |
else: | |
result='fail' | |
return f'{result} with {marks} marks' | |
# return redirect(url_for(result,score=marks)) | |
if __name__ == "__main__": | |
app.run(host="0.0.0.0", port=7860) | |