Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from google.genai import types
|
|
4 |
import os
|
5 |
from typing import Optional, List
|
6 |
from huggingface_hub import whoami
|
7 |
-
from PIL import Image
|
8 |
from io import BytesIO
|
9 |
import tempfile
|
10 |
|
@@ -105,7 +105,6 @@ def run_single_image_logic(prompt: str, image_path: Optional[str] = None, progre
|
|
105 |
description = response.text
|
106 |
|
107 |
# Create a placeholder image with the description
|
108 |
-
from PIL import Image, ImageDraw, ImageFont
|
109 |
img = Image.new('RGB', (512, 512), color='white')
|
110 |
draw = ImageDraw.Draw(img)
|
111 |
|
@@ -161,7 +160,6 @@ def run_multi_image_logic(prompt: str, images: List[str], progress=gr.Progress()
|
|
161 |
|
162 |
# Create a result image with the analysis
|
163 |
if hasattr(response, 'text') and response.text:
|
164 |
-
from PIL import Image, ImageDraw
|
165 |
img = Image.new('RGB', (512, 512), color='white')
|
166 |
draw = ImageDraw.Draw(img)
|
167 |
|
|
|
4 |
import os
|
5 |
from typing import Optional, List
|
6 |
from huggingface_hub import whoami
|
7 |
+
from PIL import Image, ImageDraw, ImageFont
|
8 |
from io import BytesIO
|
9 |
import tempfile
|
10 |
|
|
|
105 |
description = response.text
|
106 |
|
107 |
# Create a placeholder image with the description
|
|
|
108 |
img = Image.new('RGB', (512, 512), color='white')
|
109 |
draw = ImageDraw.Draw(img)
|
110 |
|
|
|
160 |
|
161 |
# Create a result image with the analysis
|
162 |
if hasattr(response, 'text') and response.text:
|
|
|
163 |
img = Image.new('RGB', (512, 512), color='white')
|
164 |
draw = ImageDraw.Draw(img)
|
165 |
|