Jack1808 commited on
Commit
eb4af2d
Β·
verified Β·
1 Parent(s): 2ec3a8b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +146 -146
README.md CHANGED
@@ -1,147 +1,147 @@
1
- ---
2
- title: Food Manu Frontend
3
- emoji: πŸ†
4
- colorFrom: red
5
- colorTo: gray
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12
-
13
- # 🍽️ Menu Extractor & Food Image Generator
14
-
15
- An AI-powered web application that extracts menu items from restaurant menu images and generates beautiful food images for each item using advanced machine learning models.
16
-
17
- ## 🌟 Features
18
-
19
- - **πŸ“Έ Menu Image Upload**: Upload menu images or capture them directly using your camera
20
- - **πŸ€– AI Menu Extraction**: Uses Google's Gemini AI to extract menu items, descriptions, and prices
21
- - **🎨 Food Image Generation**: Generates high-quality food images using Stable Diffusion
22
- - **πŸ’» Beautiful Frontend**: Modern, responsive web interface with live preview
23
- - **πŸ“± Mobile Friendly**: Works seamlessly on desktop and mobile devices
24
- - **πŸ”„ Code Generation**: Automatically generates clean HTML code for the extracted menu
25
-
26
- ## πŸš€ Demo
27
-
28
- Try the live demo: [Menu Extractor & Food Generator](https://huggingface.co/spaces/your-username/menu-extractor)
29
-
30
- ## πŸ› οΈ Technology Stack
31
-
32
- - **Backend**: Flask (Python)
33
- - **AI Models**:
34
- - Google Gemini 1.5 Flash (Menu extraction)
35
- - Stable Diffusion v1.5 (Image generation)
36
- - **Frontend**: HTML, CSS, JavaScript
37
- - **Image Processing**: Pillow (PIL)
38
- - **Deployment**: Hugging Face Spaces
39
-
40
- ## πŸ“‹ Requirements
41
-
42
- - Python 3.9+
43
- - CUDA-compatible GPU (recommended for faster image generation)
44
- - Google Gemini API key
45
-
46
- ## πŸ”§ Installation
47
-
48
- 1. Clone the repository:
49
- ```bash
50
- git clone https://github.com/your-username/menu-extractor.git
51
- cd menu-extractor
52
- ```
53
-
54
- 2. Install dependencies:
55
- ```bash
56
- pip install -r requirements.txt
57
- ```
58
-
59
- 3. Set up environment variables:
60
- Create a `.env` file and add your Gemini API key:
61
- ```
62
- GEMINI_API_KEY=your_gemini_api_key_here
63
- ```
64
-
65
- 4. Run the application:
66
- ```bash
67
- python app.py
68
- ```
69
-
70
- 5. Open your browser and navigate to `http://localhost:7860`
71
-
72
- ## 🌐 Deployment on Hugging Face Spaces
73
-
74
- 1. Create a new Space on [Hugging Face Spaces](https://huggingface.co/spaces)
75
- 2. Choose "Docker" as the SDK
76
- 3. Upload the following files:
77
- - `app.py`
78
- - `templates/index.html`
79
- - `Dockerfile`
80
- - `requirements.txt`
81
- - `README.md`
82
- 4. Add your `GEMINI_API_KEY` in the Space settings under "Variables and secrets"
83
- 5. Your app will be automatically deployed!
84
-
85
- ## πŸ“– How to Use
86
-
87
- 1. **Upload Image**: Choose to upload a menu image from your device or take a photo using your camera
88
- 2. **Extract Menu**: Click "Extract Menu Items" to process the image with AI
89
- 3. **View Results**: See the beautiful menu layout with generated food images
90
- 4. **Get Code**: Switch to code view to copy the generated HTML for your own use
91
-
92
- ## 🎯 Use Cases
93
-
94
- - **Restaurant Owners**: Quickly digitize physical menus
95
- - **Web Developers**: Generate menu websites for restaurant clients
96
- - **Food Bloggers**: Create visual menu content
97
- - **Menu Design**: Prototype digital menu layouts
98
-
99
- ## πŸ”‘ API Keys Setup
100
-
101
- ### Google Gemini API
102
- 1. Visit [Google AI Studio](https://makersuite.google.com/)
103
- 2. Create a new API key
104
- 3. Add it to your environment variables as `GEMINI_API_KEY`
105
-
106
- ## ⚑ Performance Notes
107
-
108
- - **CPU Mode**: Image generation will be slower but still functional
109
- - **GPU Mode**: Significantly faster image generation with CUDA-compatible GPU
110
- - **Memory**: Requires ~4GB RAM for optimal performance
111
-
112
- ## πŸ› Troubleshooting
113
-
114
- ### Common Issues:
115
-
116
- 1. **Model Loading Error**: Ensure you have sufficient disk space and memory
117
- 2. **API Key Error**: Verify your Gemini API key is correctly set
118
- 3. **Image Processing Error**: Check that uploaded images are in supported formats (JPG, PNG)
119
-
120
- ## πŸ“„ License
121
-
122
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
123
-
124
- ## 🀝 Contributing
125
-
126
- Contributions are welcome! Please feel free to submit a Pull Request.
127
-
128
- 1. Fork the project
129
- 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
130
- 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
131
- 4. Push to the branch (`git push origin feature/AmazingFeature`)
132
- 5. Open a Pull Request
133
-
134
- ## πŸ™ Acknowledgments
135
-
136
- - [Google Gemini](https://deepmind.google/technologies/gemini/) for menu extraction
137
- - [Stable Diffusion](https://stability.ai/) for food image generation
138
- - [Hugging Face](https://huggingface.co/) for hosting and deployment
139
- - [Flask](https://flask.palletsprojects.com/) for the web framework
140
-
141
- ## πŸ“ž Support
142
-
143
- If you encounter any issues or have questions, please [open an issue](https://github.com/your-username/menu-extractor/issues) on GitHub.
144
-
145
- ---
146
-
147
  Made with ❀️ by [Your Name](https://github.com/your-username)
 
1
+ ---
2
+ title: Food Manu Extractor & Frontend
3
+ emoji: πŸ†
4
+ colorFrom: red
5
+ colorTo: gray
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---
10
+
11
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12
+
13
+ # 🍽️ Menu Extractor & Food Image Generator
14
+
15
+ An AI-powered web application that extracts menu items from restaurant menu images and generates beautiful food images for each item using advanced machine learning models.
16
+
17
+ ## 🌟 Features
18
+
19
+ - **πŸ“Έ Menu Image Upload**: Upload menu images or capture them directly using your camera
20
+ - **πŸ€– AI Menu Extraction**: Uses Google's Gemini AI to extract menu items, descriptions, and prices
21
+ - **🎨 Food Image Generation**: Generates high-quality food images using Stable Diffusion
22
+ - **πŸ’» Beautiful Frontend**: Modern, responsive web interface with live preview
23
+ - **πŸ“± Mobile Friendly**: Works seamlessly on desktop and mobile devices
24
+ - **πŸ”„ Code Generation**: Automatically generates clean HTML code for the extracted menu
25
+
26
+ ## πŸš€ Demo
27
+
28
+ Try the live demo: [Menu Extractor & Food Generator](https://huggingface.co/spaces/your-username/menu-extractor)
29
+
30
+ ## πŸ› οΈ Technology Stack
31
+
32
+ - **Backend**: Flask (Python)
33
+ - **AI Models**:
34
+ - Google Gemini 1.5 Flash (Menu extraction)
35
+ - Stable Diffusion v1.5 (Image generation)
36
+ - **Frontend**: HTML, CSS, JavaScript
37
+ - **Image Processing**: Pillow (PIL)
38
+ - **Deployment**: Hugging Face Spaces
39
+
40
+ ## πŸ“‹ Requirements
41
+
42
+ - Python 3.9+
43
+ - CUDA-compatible GPU (recommended for faster image generation)
44
+ - Google Gemini API key
45
+
46
+ ## πŸ”§ Installation
47
+
48
+ 1. Clone the repository:
49
+ ```bash
50
+ git clone https://github.com/your-username/menu-extractor.git
51
+ cd menu-extractor
52
+ ```
53
+
54
+ 2. Install dependencies:
55
+ ```bash
56
+ pip install -r requirements.txt
57
+ ```
58
+
59
+ 3. Set up environment variables:
60
+ Create a `.env` file and add your Gemini API key:
61
+ ```
62
+ GEMINI_API_KEY=your_gemini_api_key_here
63
+ ```
64
+
65
+ 4. Run the application:
66
+ ```bash
67
+ python app.py
68
+ ```
69
+
70
+ 5. Open your browser and navigate to `http://localhost:7860`
71
+
72
+ ## 🌐 Deployment on Hugging Face Spaces
73
+
74
+ 1. Create a new Space on [Hugging Face Spaces](https://huggingface.co/spaces)
75
+ 2. Choose "Docker" as the SDK
76
+ 3. Upload the following files:
77
+ - `app.py`
78
+ - `templates/index.html`
79
+ - `Dockerfile`
80
+ - `requirements.txt`
81
+ - `README.md`
82
+ 4. Add your `GEMINI_API_KEY` in the Space settings under "Variables and secrets"
83
+ 5. Your app will be automatically deployed!
84
+
85
+ ## πŸ“– How to Use
86
+
87
+ 1. **Upload Image**: Choose to upload a menu image from your device or take a photo using your camera
88
+ 2. **Extract Menu**: Click "Extract Menu Items" to process the image with AI
89
+ 3. **View Results**: See the beautiful menu layout with generated food images
90
+ 4. **Get Code**: Switch to code view to copy the generated HTML for your own use
91
+
92
+ ## 🎯 Use Cases
93
+
94
+ - **Restaurant Owners**: Quickly digitize physical menus
95
+ - **Web Developers**: Generate menu websites for restaurant clients
96
+ - **Food Bloggers**: Create visual menu content
97
+ - **Menu Design**: Prototype digital menu layouts
98
+
99
+ ## πŸ”‘ API Keys Setup
100
+
101
+ ### Google Gemini API
102
+ 1. Visit [Google AI Studio](https://makersuite.google.com/)
103
+ 2. Create a new API key
104
+ 3. Add it to your environment variables as `GEMINI_API_KEY`
105
+
106
+ ## ⚑ Performance Notes
107
+
108
+ - **CPU Mode**: Image generation will be slower but still functional
109
+ - **GPU Mode**: Significantly faster image generation with CUDA-compatible GPU
110
+ - **Memory**: Requires ~4GB RAM for optimal performance
111
+
112
+ ## πŸ› Troubleshooting
113
+
114
+ ### Common Issues:
115
+
116
+ 1. **Model Loading Error**: Ensure you have sufficient disk space and memory
117
+ 2. **API Key Error**: Verify your Gemini API key is correctly set
118
+ 3. **Image Processing Error**: Check that uploaded images are in supported formats (JPG, PNG)
119
+
120
+ ## πŸ“„ License
121
+
122
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
123
+
124
+ ## 🀝 Contributing
125
+
126
+ Contributions are welcome! Please feel free to submit a Pull Request.
127
+
128
+ 1. Fork the project
129
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
130
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
131
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
132
+ 5. Open a Pull Request
133
+
134
+ ## πŸ™ Acknowledgments
135
+
136
+ - [Google Gemini](https://deepmind.google/technologies/gemini/) for menu extraction
137
+ - [Stable Diffusion](https://stability.ai/) for food image generation
138
+ - [Hugging Face](https://huggingface.co/) for hosting and deployment
139
+ - [Flask](https://flask.palletsprojects.com/) for the web framework
140
+
141
+ ## πŸ“ž Support
142
+
143
+ If you encounter any issues or have questions, please [open an issue](https://github.com/your-username/menu-extractor/issues) on GitHub.
144
+
145
+ ---
146
+
147
  Made with ❀️ by [Your Name](https://github.com/your-username)