Spaces:
Sleeping
Sleeping
Update README with Space configuration
Browse files
README.md
CHANGED
|
@@ -1,34 +1,48 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
##
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
| 12 |
-
git clone https://github.com/googlecreativelab/gemini-demos/
|
| 13 |
-
cd image-to-code-sketch
|
| 14 |
-
npm install
|
| 15 |
-
```
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
GEMINI_API_KEY=your_api_key_here
|
| 23 |
-
```
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
```
|
|
|
|
| 28 |
npm run dev
|
| 29 |
```
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|