ajitesh123 / AI-Stylist

OpenAI GPT-4 With Vision 🔥 This repository features an outfit rating app using OpenAI's GPT-4 with the Vision extension. Users can upload images through a Streamlit interface, and the app provides both a fashion stylist's and a mother's verdict on the outfit. Contributions are welcome!
MIT License
2 stars 0 forks source link

## Refactor the application to use Flask and SQLAlchemy #3

Closed ajitesh123 closed 5 months ago

ajitesh123 commented 5 months ago

This pull request refactors the existing application to use Flask as the web framework and SQLAlchemy as the ORM for database interactions. The main changes are:

  1. Moved the application setup and configuration to a create_app() function, which initializes the Flask app, sets up the database connection using SQLAlchemy, and registers the blueprint routes.
  2. Removed the Gradio-based interface and the OpenAI API integration, as these were not part of the main purpose of the application.
  3. Created separate blueprint routes for the user-related functionality (user_view) and the main application functionality (main_view).
  4. Initialized the SQLAlchemy database instance and created the necessary database tables within the create_app() function.

These changes lay the foundation for a more modular and maintainable application structure, which will make it easier to add new features and functionality in the future. The removal of the Gradio and OpenAI components also helps to focus the application on its core purpose of providing a fashion assistant experience for users.

ajitesh123 commented 5 months ago

This needs to be rewritten