Trudy commited on
Commit
291474d
·
1 Parent(s): 1f423ae

Update README with Space configuration

Browse files
Files changed (1) hide show
  1. README.md +32 -19
README.md CHANGED
@@ -1,34 +1,48 @@
1
- # Image to Code Generator 🎨
 
 
 
 
 
 
 
 
2
 
3
- ![image-to-code-sketch](./readme/smoke.gif)
4
 
5
- Get started with p5js sketches using Gemini 2.0 Flash. Upload any photo, and this web app uses Gemini 2.0 Flash to generate a p5.js sketch that captures the essence of the image in an interactive way.
6
 
7
- ## Getting Started
8
 
9
- ### 1. Clone this repository and install dependencies:
 
 
 
 
10
 
11
- ```
12
- git clone https://github.com/googlecreativelab/gemini-demos/
13
- cd image-to-code-sketch
14
- npm install
15
- ```
16
 
17
- ### 2. Create a .env.local file with your AI Studio API key:
18
 
19
- Get your API key from [Google AI Studio](https://aistudio.google.com/apikey).
20
 
21
- ```
22
- GEMINI_API_KEY=your_api_key_here
23
- ```
24
 
25
- ### 3. Start the development server:
26
 
27
- ```
 
28
  npm run dev
29
  ```
30
 
31
- Open http://localhost:3000 and start uploading images!
 
 
 
 
 
 
 
32
 
33
  ## Prompt Transparency
34
 
@@ -68,7 +82,6 @@ Complete all of these steps. When you write your code, be sure to leave clear co
68
  Do not EVER try to load in external images or any other libraries. Everything must be self contained in the one file and code snippet.
69
 
70
  And don't be too verbose.
71
- ```
72
 
73
  ## Credits
74
 
 
1
+ ---
2
+ title: Gemini Image to Code
3
+ emoji: 🌠
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ app_port: 7860
8
+ pinned: false
9
+ ---
10
 
11
+ # Gemini Image to Code
12
 
13
+ A web application that uses Google's Gemini Pro Vision model to convert images into code. Upload an image and get the corresponding HTML/CSS code that recreates the design.
14
 
15
+ ## Features
16
 
17
+ - Image to code conversion using Gemini Pro Vision
18
+ - Real-time code preview
19
+ - Support for various image formats
20
+ - Modern, responsive UI
21
+ - Code syntax highlighting
22
 
23
+ ## Environment Variables
 
 
 
 
24
 
25
+ The following environment variables are required:
26
 
27
+ - `GEMINI_API_KEY`: Your Google Gemini API key
28
 
29
+ ## Development
 
 
30
 
31
+ To run this project locally:
32
 
33
+ ```bash
34
+ npm install
35
  npm run dev
36
  ```
37
 
38
+ ## Docker
39
+
40
+ To run with Docker:
41
+
42
+ ```bash
43
+ docker build -t gemini-image-to-code .
44
+ docker run -p 7860:7860 -e GEMINI_API_KEY=your_key_here gemini-image-to-code
45
+ ```
46
 
47
  ## Prompt Transparency
48
 
 
82
  Do not EVER try to load in external images or any other libraries. Everything must be self contained in the one file and code snippet.
83
 
84
  And don't be too verbose.
 
85
 
86
  ## Credits
87