From 3cb3801aacd8e0dd7a93cd72f8484f99d966faa1 Mon Sep 17 00:00:00 2001 From: RajaVardhan-coder Date: Thu, 5 Oct 2023 12:48:38 +0530 Subject: [PATCH 1/2] Color Recommendation Portal --- frontend/ColourRecommandation/README.md | 25 ++++ frontend/ColourRecommandation/main.py | 21 +++ .../ColourRecommandation/templates/index.html | 130 ++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 frontend/ColourRecommandation/README.md create mode 100644 frontend/ColourRecommandation/main.py create mode 100644 frontend/ColourRecommandation/templates/index.html diff --git a/frontend/ColourRecommandation/README.md b/frontend/ColourRecommandation/README.md new file mode 100644 index 0000000..aa2ec90 --- /dev/null +++ b/frontend/ColourRecommandation/README.md @@ -0,0 +1,25 @@ +Color Recommendation Portal 🌈 + +Overview + +This Flask web application is a Color Recommendation Portal that allows users to input text and receive a set of recommended colors based on that text. The application features a modern and colorful design with a dynamic gradient background. + +Features +- Users can input text into the provided field. +- Upon submitting the text, the application retrieves color recommendations. +- The recommended colors are displayed in square boxes below the input field. +- The gradient background adds a colorful and dynamic touch to the user interface. + + +Technologies Used + +Flask: A Python web framework used for the backend. +HTML and CSS: For the frontend user interface. +JavaScript: For handling user interactions and displaying color recommendations. + + +How to Run +- Ensure you have Python and Flask installed on your system. +- Navigate to the project directory. +- Run the Flask app by executing python main.py in your terminal. +- Open your web browser and access the application at http://localhost:5000. \ No newline at end of file diff --git a/frontend/ColourRecommandation/main.py b/frontend/ColourRecommandation/main.py new file mode 100644 index 0000000..4fff461 --- /dev/null +++ b/frontend/ColourRecommandation/main.py @@ -0,0 +1,21 @@ +# app.py (Flask Backend) + +from flask import Flask, request, render_template, jsonify + +app = Flask(__name__) + +@app.route('/') +def index(): + return render_template('index.html') + +@app.route('/recommend', methods=['POST']) +def recommend_colors(): + input_text = request.form['text'] + # Perform color recommendation logic here based on input_text + # Replace this with your actual recommendation code + recommended_colors = ['#FF5733', '#34FF45', '#A232FF'] + + return jsonify(colors=recommended_colors) + +if __name__ == '__main__': + app.run(debug=True) diff --git a/frontend/ColourRecommandation/templates/index.html b/frontend/ColourRecommandation/templates/index.html new file mode 100644 index 0000000..af71adb --- /dev/null +++ b/frontend/ColourRecommandation/templates/index.html @@ -0,0 +1,130 @@ + + + + + + + Color Recommendation Portal 🌈 + + + +

Color Recommendation Portal 🌈

+
+ + + +
+
+ + + From f919d5e77e61d6c6bfac3c3d8bffc974dec2b084 Mon Sep 17 00:00:00 2001 From: RajaVardhan-coder Date: Fri, 6 Oct 2023 06:50:05 +0530 Subject: [PATCH 2/2] Removed unnecessary form attributes --- .../ColourRecommandation/templates/index.html | 211 +++++++++--------- 1 file changed, 106 insertions(+), 105 deletions(-) diff --git a/frontend/ColourRecommandation/templates/index.html b/frontend/ColourRecommandation/templates/index.html index af71adb..8036c2e 100644 --- a/frontend/ColourRecommandation/templates/index.html +++ b/frontend/ColourRecommandation/templates/index.html @@ -1,130 +1,131 @@ - - - - + + + Color Recommendation Portal 🌈 - - + +

Color Recommendation Portal 🌈

-
- - - + + + +
- +