mgbam commited on
Commit
5d3be0e
·
verified ·
1 Parent(s): fae0440

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -1,24 +1,30 @@
1
- # app.py - Unified RoboSage Deployer & Simulator (CPU & Spaces-compatible)
 
2
 
3
- import os
4
  import asyncio
5
  import gradio as gr
6
  from core_creator.voice_to_app import VoiceToAppCreator
7
  from deployer.simulator_interface import VirtualRobot
8
 
9
  async def run_pipeline(idea: str) -> str:
10
- """Runs voice-to-app pipeline and returns a status message."""
 
 
11
  creator = VoiceToAppCreator(idea)
12
  assets = creator.run_pipeline()
13
  title = assets.get("blueprint", {}).get("title", "<unknown>")
14
  return f"✅ Generated app: {title}"
15
 
16
  def deploy_callback(idea: str) -> str:
17
- """Sync wrapper for Gradio."""
 
 
18
  return asyncio.run(run_pipeline(idea))
19
 
20
  def robot_behavior(user_input: str) -> str:
21
- """Simulate robot action based on user text."""
 
 
22
  return VirtualRobot().perform_action(user_input)
23
 
24
  # Build unified Gradio interface
 
1
+ # app.py
2
+ # Unified RoboSage Deployer & Simulator (CPU & Spaces-compatible)
3
 
 
4
  import asyncio
5
  import gradio as gr
6
  from core_creator.voice_to_app import VoiceToAppCreator
7
  from deployer.simulator_interface import VirtualRobot
8
 
9
  async def run_pipeline(idea: str) -> str:
10
+ """
11
+ Runs the voice-to-app pipeline and returns a status message.
12
+ """
13
  creator = VoiceToAppCreator(idea)
14
  assets = creator.run_pipeline()
15
  title = assets.get("blueprint", {}).get("title", "<unknown>")
16
  return f"✅ Generated app: {title}"
17
 
18
  def deploy_callback(idea: str) -> str:
19
+ """
20
+ Synchronous wrapper for Gradio.
21
+ """
22
  return asyncio.run(run_pipeline(idea))
23
 
24
  def robot_behavior(user_input: str) -> str:
25
+ """
26
+ Simulate robot action based on user text.
27
+ """
28
  return VirtualRobot().perform_action(user_input)
29
 
30
  # Build unified Gradio interface