mgbam commited on
Commit
50d96bd
Β·
verified Β·
1 Parent(s): 44c1905

Update deployer/gradio_generator.py

Browse files
Files changed (1) hide show
  1. deployer/gradio_generator.py +9 -1
deployer/gradio_generator.py CHANGED
@@ -34,7 +34,6 @@ def transcribe_audio(audio_file: str) -> str:
34
  if response.status_code != 200:
35
  return f"❗ Transcription error: {response.status_code}"
36
  result = response.json()
37
- # The inference API returns {'text': '...'}
38
  return result.get("text", "")
39
 
40
  # Combined flow
@@ -79,6 +78,15 @@ def launch_gradio_app(
79
  outputs=[status, download_zip, blueprint_view, code_view]
80
  )
81
 
 
 
 
 
 
 
 
 
 
82
  # 2. Robot Simulation (Text & Voice)
83
  with gr.Accordion("πŸ€– Test Your Robot", open=False):
84
  text_input = gr.Textbox(label="Text Command", placeholder="Type 'hello' or 'say Good job!'" )
 
34
  if response.status_code != 200:
35
  return f"❗ Transcription error: {response.status_code}"
36
  result = response.json()
 
37
  return result.get("text", "")
38
 
39
  # Combined flow
 
78
  outputs=[status, download_zip, blueprint_view, code_view]
79
  )
80
 
81
+ # Browse artifacts directory
82
+ gr.Markdown("**Browse Generated Artifacts**")
83
+ files_browser = gr.File(
84
+ label="Artifacts Directory",
85
+ file_count="multiple",
86
+ file_types=None,
87
+ value="/data"
88
+ )
89
+
90
  # 2. Robot Simulation (Text & Voice)
91
  with gr.Accordion("πŸ€– Test Your Robot", open=False):
92
  text_input = gr.Textbox(label="Text Command", placeholder="Type 'hello' or 'say Good job!'" )