This project is a Node.js and Express-based API that allows users to ask cooking-related questions. It uses Hugging Face's LLaMA model to generate AI-powered responses.
- Query Hugging Face's LLaMA model for cooking advice.
- Handle API requests and responses using Express.js.
- JSON-based API for easy integration with frontend applications.
COOK.AI.mp4
- Node.js (v14+)
- Express.js
- Hugging Face API key
- Clone this repository:
git clone https://github.com/stackmasteraliza/cook-ai.git cd cook-ai - Install dependencies:
npm install
- Create a
.envfile and add your Hugging Face API key:HUGGINGFACE_API_KEY=your_api_key_here
- Start the server:
node index.js
- Make a request to the API:
curl -X POST http://localhost:3000/ask -H "Content-Type: application/json" -d '{"question": "How do I make a perfect omelette?"}'
Request:
{
"question": "How do I make a perfect omelette?"
}Response:
{
"answer": "To make a perfect omelette, beat eggs, heat butter in a pan, pour the eggs, and fold when slightly firm."
}- Node.js
- Express.js
- Hugging Face API (LLaMA Model)
This project is licensed under the MIT License.