Spaces:
Runtime error
Runtime error
Download app.py from Subbu1304/restaurant: direct link, hf CLI and curl.
- Browser
- Download file 784 Bytes
-
https://huggingface.co/spaces/Subbu1304/restaurant/resolve/main/app.py
- Command line
-
hf download hf://spaces/Subbu1304/restaurant/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Subbu1304/restaurant/resolve/main/app.py
784 Bytes
| from flask import Flask, render_template, request, redirect, url_for | |
| app = Flask(__name__) | |
| # Route to render signup page | |
| def signup_form(): | |
| return render_template('signup.html') | |
| # Route to handle signup form submission | |
| def signup(): | |
| username = request.form['username'] | |
| email = request.form['email'] | |
| password = request.form['password'] | |
| confirm_password = request.form['confirm_password'] | |
| # Simple validation | |
| if password != confirm_password: | |
| return "Passwords do not match. Please try again." | |
| # Here, you would typically add code to store the user's data in a database | |
| return f"Account for {username} created successfully!" | |
| if __name__ == '__main__': | |
| app.run(debug=True) | |