Download services/gemini/prompt.py from modventures/floor-visualizer-gpu: direct link, hf CLI and curl.
- Browser
- Download file 2.2 kB
-
https://huggingface.co/spaces/modventures/floor-visualizer-gpu/resolve/main/services/gemini/prompt.py
- Command line
-
hf download hf://spaces/modventures/floor-visualizer-gpu/services/gemini/prompt.py
-
curl -L -o prompt.py https://huggingface.co/spaces/modventures/floor-visualizer-gpu/resolve/main/services/gemini/prompt.py
2.2 kB
| """Gemini tile-refinement prompt construction.""" | |
| def build_gemini_tile_refinement_prompt(tile_name: str | None = None) -> str: | |
| tile_hint = f'\nTile/material label hint: "{tile_name}".' if tile_name else "" | |
| return f"""You are performing a conservative photorealistic finishing pass on an interior tile visualizer render. | |
| Use the supplied image as the source of truth. The tile has already been selected, laid out, scaled, rotated, grouted, and composited by the renderer. | |
| Primary goal: | |
| Make the already-applied tile surface look more naturally integrated into the room by refining missing realism: local reflections, gloss response, tiny contact shadows, ambient occlusion, edge blending, perspective-light consistency, color bleed, highlight rolloff, and surface micro-detail. | |
| Hard preservation rules: | |
| - Do not replace, recreate, reinterpret, or redesign the tile. | |
| - Do not change the tile pattern, print, veining, motif, color palette, layout, scale, grout spacing, grout color, rotation, perspective, or tile boundaries. | |
| - Do not invent a different material, add new decorative features, or remove existing tile details. | |
| - Do not alter furniture, walls, fixtures, objects, room architecture, camera angle, crop, image size, or composition. | |
| - Do not smooth away the tile's existing texture or make repeated tiles look like a different product. | |
| - If an improvement would require changing the tile design, leave that area unchanged. | |
| Allowed refinements only: | |
| - Subtle physically plausible reflections and specular highlights that follow the existing room lighting. | |
| - More natural shadowing where the tiled surface meets walls, cabinets, furniture legs, baseboards, or other occluding objects. | |
| - Better blending at tile-mask edges while preserving the existing boundary. | |
| - Gentle local contrast, roughness, and micro-surface detail so the tile feels photographed in the room. | |
| - Correct small rendering artifacts, halos, missing reflection cues, or flat-looking areas without changing the design. | |
| Return only the refined image. Keep the same aspect ratio and composition. The result should look like the same rendered tile installation, just more realistic and finished.{tile_hint}""" | |