forked from cgvr/DeltaVR
Cube that starts generation pipeline on collision
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user