Skip to content

modernize code , Updated README and requirements.txt with Streamlit a…#1

Open
Youmna-Younis wants to merge 5 commits intoAchilleasKn:masterfrom
Youmna-Younis:master
Open

modernize code , Updated README and requirements.txt with Streamlit a…#1
Youmna-Younis wants to merge 5 commits intoAchilleasKn:masterfrom
Youmna-Younis:master

Conversation

@Youmna-Younis
Copy link
Copy Markdown

Modernized Codebase and Added Streamlit UI

Key Updates

  1. Code Modernization:

    • Updated the Flask API to use modern Python practices and libraries.
    • Ensured compatibility with the latest versions of dependencies (e.g., Flask, scikit-learn, numpy).
  2. Streamlit Frontend:

    • Added a Streamlit app (streamlit_app.py) to provide an interactive and user-friendly interface for interacting with the Flask API.
    • Users can now input feature values (Sepal Length, Sepal Width, Petal Length, Petal Width) through a web-based UI and view predictions dynamically.
    • Enhanced the UI with visually appealing elements, such as a project-specific background and images of Iris species.
  3. Improved Documentation:

    • Updated the README.md file to include detailed instructions for running both the Flask API and the Streamlit app.
    • Added placeholders for screenshots to demonstrate the Streamlit app's functionality.
  4. Dependencies Management:

    • Updated the requirements.txt file to include new dependencies like streamlit, requests, and flask-cors.
    • Ensured all dependencies are pinned to specific versions for reproducibility.
  5. Organized Project Structure:

    • Added an imgs folder to store images used in the Streamlit app (e.g., Iris flower images).
    • Ensured the project structure is clean and modular, making it easier to maintain and extend.

How to Test

  1. Clone the repository:

    git clone https://github.com/Youmna-Younis/flask_api_python.git
    cd flask_api_python
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the Flask API:

    python api.py
  4. Run the Streamlit app:

    streamlit run streamlit_app.py
  5. Open the Streamlit app in your browser at http://localhost:8501 and test the prediction functionality.

Screenshots

  • Streamlit App Interface:
    Streamlit App

Why These Changes Matter

The original repository was created 7 years ago and has not been updated to reflect modern development practices. This PR addresses that gap by:

  • Modernizing the codebase to ensure compatibility with current tools and libraries.
  • Adding a Streamlit frontend to make the project more accessible and engaging for users.
  • Improving documentation and project organization to make it easier for others to contribute or deploy the application.

Thank you for considering this contribution! Let me know if you have any questions or need further clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant