diegocp01 commited on
Commit
3fdb736
·
verified ·
1 Parent(s): 506b623

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,9 +12,11 @@ client = genai.Client(api_key=API_KEY)
12
  def edit_image_with_gemini(image, text_input):
13
  """
14
  Edits an image using Gemini 2.0 Flash Experimental API based on a given text prompt.
 
15
  Parameters:
16
  image_path (str): Path to the input image.
17
  text_prompt (str): Text prompt describing the edit.
 
18
  Returns:
19
  Image: The modified image.
20
  """
@@ -40,7 +42,6 @@ def edit_image_with_gemini(image, text_input):
40
  return "No image was generated. Try modifying your prompt.", None
41
 
42
 
43
-
44
  # Gradio App
45
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
46
  gr.Markdown("# ✨ AI-Powered Image Editor with Gemini 2.0 Flash Experimental")
 
12
  def edit_image_with_gemini(image, text_input):
13
  """
14
  Edits an image using Gemini 2.0 Flash Experimental API based on a given text prompt.
15
+
16
  Parameters:
17
  image_path (str): Path to the input image.
18
  text_prompt (str): Text prompt describing the edit.
19
+
20
  Returns:
21
  Image: The modified image.
22
  """
 
42
  return "No image was generated. Try modifying your prompt.", None
43
 
44
 
 
45
  # Gradio App
46
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
47
  gr.Markdown("# ✨ AI-Powered Image Editor with Gemini 2.0 Flash Experimental")