Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import tempfile
|
|
| 3 |
from PIL import Image
|
| 4 |
import gradio as gr
|
| 5 |
import google.generativeai as genai
|
|
|
|
| 6 |
|
| 7 |
# Hardcode the Gemini API key
|
| 8 |
GEMINI_API_KEY = "AIzaSyDL5Rilo7ptJpUOZdY6wy8PJYUcVcnDADs"
|
|
@@ -149,16 +150,4 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 149 |
outputs=[uploaded_gallery]
|
| 150 |
)
|
| 151 |
|
| 152 |
-
gr.Markdown("## Try these examples")
|
| 153 |
-
examples = [
|
| 154 |
-
["data/1.webp", "change text to 'HUGGINGFACE'"],
|
| 155 |
-
["data/2.webp", "remove the spoon from hand only"],
|
| 156 |
-
["data/3.webp", "change text to 'AI POWERED'"],
|
| 157 |
-
["data/1.jpg", "add futuristic style to background"],
|
| 158 |
-
]
|
| 159 |
-
gr.Examples(
|
| 160 |
-
examples=examples,
|
| 161 |
-
inputs=[image_input, prompt_input]
|
| 162 |
-
)
|
| 163 |
-
|
| 164 |
demo.launch()
|
|
|
|
| 3 |
from PIL import Image
|
| 4 |
import gradio as gr
|
| 5 |
import google.generativeai as genai
|
| 6 |
+
from io import BytesIO
|
| 7 |
|
| 8 |
# Hardcode the Gemini API key
|
| 9 |
GEMINI_API_KEY = "AIzaSyDL5Rilo7ptJpUOZdY6wy8PJYUcVcnDADs"
|
|
|
|
| 150 |
outputs=[uploaded_gallery]
|
| 151 |
)
|
| 152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
demo.launch()
|