Spaces:
Running
Running
Upload vision/image_generator.py with huggingface_hub
Browse files
vision/image_generator.py
CHANGED
|
@@ -37,9 +37,10 @@ def generate_image(
|
|
| 37 |
|
| 38 |
out_path = os.path.join(OUTPUT_DIR, output_filename)
|
| 39 |
|
| 40 |
-
|
|
|
|
| 41 |
seed_param = f"&seed={seed}" if seed is not None else ""
|
| 42 |
-
image_url = f"https://image.pollinations.ai/prompt/{encoded_prompt}?width={width}&height={height}&model={model}&nologo=true{seed_param}"
|
| 43 |
|
| 44 |
print(f"🎨 Generating clean image for prompt: '{prompt}'...", flush=True)
|
| 45 |
|
|
|
|
| 37 |
|
| 38 |
out_path = os.path.join(OUTPUT_DIR, output_filename)
|
| 39 |
|
| 40 |
+
clean_prompt = prompt + ", masterpiece, pristine quality, high resolution, vector asset, no watermark, no logo, no text"
|
| 41 |
+
encoded_prompt = urllib.parse.quote(clean_prompt)
|
| 42 |
seed_param = f"&seed={seed}" if seed is not None else ""
|
| 43 |
+
image_url = f"https://image.pollinations.ai/prompt/{encoded_prompt}?width={width}&height={height}&model={model}&nologo=true&nofeed=true{seed_param}"
|
| 44 |
|
| 45 |
print(f"🎨 Generating clean image for prompt: '{prompt}'...", flush=True)
|
| 46 |
|