Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- Dockerfile +38 -0
- README.md +68 -0
Dockerfile
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.11 slim image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
gcc \
|
| 10 |
+
g++ \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
# Copy full requirements for all integrations
|
| 14 |
+
COPY requirements.txt ./requirements.txt
|
| 15 |
+
|
| 16 |
+
# Install Python dependencies
|
| 17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
+
|
| 19 |
+
# Copy backend code
|
| 20 |
+
COPY backend/ ./backend/
|
| 21 |
+
|
| 22 |
+
# Copy frontend assets
|
| 23 |
+
COPY frontend/ ./frontend/
|
| 24 |
+
|
| 25 |
+
# Note: `aiofiles` is included in requirements.txt, no separate install needed
|
| 26 |
+
|
| 27 |
+
# Create a combined FastAPI app that serves both API and frontend
|
| 28 |
+
COPY app.py .
|
| 29 |
+
|
| 30 |
+
# Expose port (Hugging Face Spaces will set PORT environment variable)
|
| 31 |
+
EXPOSE 7860
|
| 32 |
+
|
| 33 |
+
# Set environment variables
|
| 34 |
+
ENV PYTHONPATH=/app
|
| 35 |
+
ENV DATABASE_URL=sqlite:///./chefcode.db
|
| 36 |
+
|
| 37 |
+
# Run the application
|
| 38 |
+
CMD ["python", "app.py"]
|
README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π³ ChefCode - AI Restaurant Management
|
| 2 |
+
|
| 3 |
+
An AI-powered restaurant inventory and recipe management system with voice recognition and web recipe search.
|
| 4 |
+
|
| 5 |
+
## π Features
|
| 6 |
+
|
| 7 |
+
- **AI Assistant**: Voice and text commands for inventory and recipe management
|
| 8 |
+
- **Web Recipe Search**: Find and import recipes from TheMealDB
|
| 9 |
+
- **Inventory Management**: Track ingredients with quantities and prices
|
| 10 |
+
- **Recipe Management**: Create, edit, and manage recipes
|
| 11 |
+
- **Voice Recognition**: Hands-free operation with continuous conversation
|
| 12 |
+
|
| 13 |
+
## π― Quick Start
|
| 14 |
+
|
| 15 |
+
1. **Open the app** - The interface will load automatically
|
| 16 |
+
2. **Enable microphone** when prompted for voice commands
|
| 17 |
+
3. **Try these commands**:
|
| 18 |
+
- π€ "Add 5 kg of flour at 2 euros per kg"
|
| 19 |
+
- π€ "Search for pasta recipes"
|
| 20 |
+
- π€ "Add recipe Pizza with flour 500 grams and tomato 200 ml"
|
| 21 |
+
|
| 22 |
+
## π€ AI Assistant Commands
|
| 23 |
+
|
| 24 |
+
### Inventory Management
|
| 25 |
+
- "Add 5 kg of rice at 2.50 euros per kg"
|
| 26 |
+
- "Update flour to 10 kg"
|
| 27 |
+
- "Remove tomatoes from inventory"
|
| 28 |
+
- "How much rice do we have?"
|
| 29 |
+
|
| 30 |
+
### Recipe Management
|
| 31 |
+
- "Add recipe Pizza with flour 100 kg and tomato sauce 200 ml"
|
| 32 |
+
- "Search for Italian pasta recipes"
|
| 33 |
+
- "Edit recipe Pizza by adding 2 grams of salt"
|
| 34 |
+
- "Show me all dessert recipes"
|
| 35 |
+
|
| 36 |
+
## π Web Recipe Search
|
| 37 |
+
|
| 38 |
+
1. Go to **Recipes** section
|
| 39 |
+
2. Click **"Search Recipe from Web"**
|
| 40 |
+
3. Search for any recipe (e.g., "Italian pasta", "chicken soup")
|
| 41 |
+
4. View results and import with AI ingredient mapping
|
| 42 |
+
|
| 43 |
+
## π¨ Interface
|
| 44 |
+
|
| 45 |
+
- **Modern Design**: Clean, responsive interface
|
| 46 |
+
- **Voice-First**: Optimized for hands-free operation
|
| 47 |
+
- **Color-Coded Results**: Visual feedback for ingredient matching
|
| 48 |
+
- **Real-Time Updates**: Live data synchronization
|
| 49 |
+
|
| 50 |
+
## π§ Technical Details
|
| 51 |
+
|
| 52 |
+
- **Backend**: FastAPI with SQLite database
|
| 53 |
+
- **AI Models**: OpenAI GPT-4o-mini and GPT-o3
|
| 54 |
+
- **Frontend**: Modern web interface with voice recognition
|
| 55 |
+
- **External APIs**: TheMealDB for recipe discovery
|
| 56 |
+
|
| 57 |
+
## π Database
|
| 58 |
+
|
| 59 |
+
The app uses SQLite for data storage with the following tables:
|
| 60 |
+
- `inventory_items` - Inventory data
|
| 61 |
+
- `recipes` - Recipe data with JSON ingredients
|
| 62 |
+
- `tasks` - Production tasks
|
| 63 |
+
|
| 64 |
+
## π Enjoy ChefCode!
|
| 65 |
+
|
| 66 |
+
Perfect for restaurant managers, chefs, and kitchen staff who want to streamline their operations with AI-powered tools.
|
| 67 |
+
|
| 68 |
+
**Start by clicking the microphone button and saying your first command!** π€β¨
|