A Flask-based web application that detects sarcasm in headlines using a pre‑trained TensorFlow model. The UI provides a clean, modern interface built with responsive CSS and custom graphics.
- Detect sarcasm levels (Very Low, Mild, Moderate, High)
- Supports English and Indonesian headlines (auto‑translation)
- Responsive design with glass‑morphism style elements
- Dark‑mode compatible colors
# Clone the repository (if not already)
git clone https://github.com/Zzybeanie/Final-Project-Alogrotma-Pemrograman-II-Web-based.git
cd Final-Project-Alogrotma-Pemrograman-II-Web-based
# Set up Python environment
python -m venv venv
source venv/bin/activate # macOS/Linux
# or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt# Run the Flask app
python sarcasm/main.pyOpen a web browser and navigate to http://127.0.0.1:5000/.
├── sarcasm/
│ ├── static/ # CSS, images, assets
│ ├── templates/ # HTML templates
│ ├── main.py # Flask app entry point
│ └── sarcasm-model5/ # TensorFlow model directory
├── .gitignore
├── requirements.txt
└── README.md
The model is stored in the sarcasm-model5 directory and loaded without the .h5 extension for compatibility with TensorFlow 2.x.
Feel free to open issues or submit pull requests. Please ensure code follows PEP8 standards and updates the documentation as needed.
This project is licensed under the MIT License – see the LICENSE file for details.
