Skip to content

A dynamic feedback system using Flask, OpenAI API, and MySQL with a user-friendly HTML/CSS interface for generating and storing contextual feedback.

Notifications You must be signed in to change notification settings

2004yash/AI-Feedback-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Feedback Form

An intelligent feedback collection system that uses OpenAI to generate dynamic follow-up questions based on user responses.

Features

  • Beautiful UI with Tailwind CSS
  • Dynamic question generation
  • Progress tracking
  • Automated follow-up questions using AI
  • Secure data storage

Setup

  1. Clone the repository:
git clone https://github.com/2004yash/AI-Feedback-form
cd AI-Feedback-form
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env.local file in the root directory with the following variables:
FLASK_SECRET_KEY=your-secret-key
OPENAI_API_KEY=your-openai-api-key
DB_HOST=your-database-host
DB_USER=your-database-username
DB_PASSWORD=your-database-password
DB_NAME=your-database-name
  1. Set up the database:
CREATE TABLE questions (
    id INT PRIMARY KEY AUTO_INCREMENT,
    question_text TEXT NOT NULL
);

CREATE TABLE feedback_qna2 (
    id INT PRIMARY KEY AUTO_INCREMENT,
    kid_name VARCHAR(255) NOT NULL,
    phone_no VARCHAR(20) NOT NULL,
    ques TEXT NOT NULL,
    ans TEXT NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
  1. Run the application:
python app.py

Environment Variables

  • FLASK_SECRET_KEY: Secret key for Flask sessions
  • OPENAI_API_KEY: Your OpenAI API key
  • DB_HOST: MySQL database host
  • DB_USER: Database username
  • DB_PASSWORD: Database password
  • DB_NAME: Database name

Tech Stack

  • Flask
  • MySQL
  • OpenAI API
  • Tailwind CSS

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A dynamic feedback system using Flask, OpenAI API, and MySQL with a user-friendly HTML/CSS interface for generating and storing contextual feedback.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published