Update core_creator/voice_to_app.py
Browse files- core_creator/voice_to_app.py +0 -18
core_creator/voice_to_app.py
CHANGED
@@ -14,31 +14,13 @@ class VoiceToAppCreator:
|
|
14 |
self.assets = None
|
15 |
|
16 |
def run_pipeline(self):
|
17 |
-
print("\n[π] Classifying robot intent...")
|
18 |
self.intent = classify_robot_idea(self.voice_input)
|
19 |
-
|
20 |
-
print(f"[π§ ] Detected intent: {self.intent}")
|
21 |
self.blueprint = generate_app_blueprint(self.voice_input, self.intent)
|
22 |
-
|
23 |
-
print("[βοΈ] Generating code from blueprint...")
|
24 |
self.generated_code = generate_app_code(self.blueprint)
|
25 |
-
|
26 |
-
print("[π¨] Fetching visual/audio assets...")
|
27 |
self.assets = fetch_visual_assets(self.intent)
|
28 |
-
|
29 |
-
print("[β
] Robot App creation complete.")
|
30 |
return {
|
31 |
"intent": self.intent,
|
32 |
"blueprint": self.blueprint,
|
33 |
"code": self.generated_code,
|
34 |
"assets": self.assets
|
35 |
}
|
36 |
-
|
37 |
-
# Example usage
|
38 |
-
if __name__ == "__main__":
|
39 |
-
user_idea = "Build a robot that teaches kids to brush their teeth with fun animations."
|
40 |
-
creator = VoiceToAppCreator(user_idea)
|
41 |
-
app_package = creator.run_pipeline()
|
42 |
-
|
43 |
-
print("\n--- Final App Package ---")
|
44 |
-
print(app_package["code"][:500]) # preview generated code
|
|
|
14 |
self.assets = None
|
15 |
|
16 |
def run_pipeline(self):
|
|
|
17 |
self.intent = classify_robot_idea(self.voice_input)
|
|
|
|
|
18 |
self.blueprint = generate_app_blueprint(self.voice_input, self.intent)
|
|
|
|
|
19 |
self.generated_code = generate_app_code(self.blueprint)
|
|
|
|
|
20 |
self.assets = fetch_visual_assets(self.intent)
|
|
|
|
|
21 |
return {
|
22 |
"intent": self.intent,
|
23 |
"blueprint": self.blueprint,
|
24 |
"code": self.generated_code,
|
25 |
"assets": self.assets
|
26 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|