1
0
forked from cgvr/DeltaVR

Cube that starts generation pipeline on collision

This commit is contained in:
2025-10-24 12:00:27 +03:00
parent 2971027af2
commit c5c40f58ab
9 changed files with 393 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ load_dotenv()
ACCOUNT_ID = os.environ["CLOUDFLARE_ACCOUNT_ID"]
API_TOKEN = os.environ["CLOUDFLARE_API_TOKEN"]
PIPELINE_FOLDER = os.environ["PIPELINE_FOLDER"]
MODEL_FOLDER = os.environ["MODEL_FOLDER"]
@@ -97,10 +98,11 @@ def main():
refined_prompt = refine_text_prompt(user_prompt)
print(f"Refined prompt: {refined_prompt}")
timestamp = get_timestamp()
image_path = Path.cwd() / "images" / f"{timestamp}.jpg"
pipeline_folder = Path(PIPELINE_FOLDER)
image_path = pipeline_folder / "images" / f"{timestamp}.jpg"
text_to_image(refined_prompt, image_path)
print(f"Generated image file: {image_path}")
model_path = Path.cwd() / "models" / timestamp
model_path = pipeline_folder / "models" / timestamp
image_to_3d(image_path, model_path)
print(f"Generated 3D model file: {model_path}")