A simple and interactive Python application for curve fitting, built
using Streamlit for the GUI and a CLI tool for terminal-based
usage.
It supports fitting Straight Line, Parabolic, and Geometric
curves to given (x, y) data points using least squares approximation.
✅ Streamlit-based interactive GUI
✅ Command-line (CLI) mode for terminal users
✅ Fits multiple curve types:
- Straight Line: y = a + bx
- Parabola: y = a + bx + cx²
- Geometric Curve: y = axᵇ
✅ Displays calculated constants and regression equations
✅ Visualizes the curve fitting results
✅ Easy-to-use modular code structure
python3 -m venv myenv
source myenv/bin/activate # On Linux/macOS
myenv\Scripts\activate # On Windowsgit clone https://github.com/nezchan0/Curve-Fitter.git
cd curve-fitter/Curve-Fitting-Toolpip install -r requirements.txtstreamlit run streamlit_app.py- Upload or input x and y data
- Choose curve type to fit
- View calculated coefficients
- Plot curve and data points
python cli_main.pyEnter the Values of the X and Y coordinates
X values: 1 2 3 4 5
Y values: 2.2 4.5 6.1 8.2 10.1
Enter the type of curve you want to fit for the given data:
Press 1: Straight Line
Press 2: Parabola
Press 3: Geometric Curve
Press 123: To Exit
Check out the live Streamlit Curve Fitter Tool here:
🔗 Live Demo -> https://nezchan0-curve-fitter-curve-fitting-toolstreamlit-app-c7r9ti.streamlit.app/
This project is licensed under the MIT License — feel free to use, modify, and distribute it freely, with attribution.
Alok Kumar Maurya – Developer | Email: [email protected]
