wuhp commited on
Commit
74f7159
·
verified ·
1 Parent(s): 28d44a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -545,7 +545,7 @@ Return **only** the python code block for app.py. Do not include any extra text,
545
  yield history, None, STATE_IDLE, updated_preview, updated_run, updated_build, 0, None, None, None
546
 
547
  elif state == STATE_COMPLETE:
548
- pass
549
 
550
 
551
  except Exception as e:
@@ -553,7 +553,7 @@ Return **only** the python code block for app.py. Do not include any extra text,
553
  history = add_bot_message(history, error_message)
554
  print(f"Critical Error in state {state}: {e}")
555
  yield history, None, STATE_IDLE, updated_preview, updated_run, updated_build, 0, None, None, None
556
- return
557
 
558
 
559
  # --- Build the Gradio UI ---
@@ -646,7 +646,7 @@ with gr.Blocks(title="AI-Powered HF Space App Builder") as ai_builder_tab:
646
  status_str = ""
647
  if is_logged_in and is_gemini_ready:
648
  status_str = "✅ Ready to send commands."
649
- else: # Consolidated status checks
650
  status_parts = []
651
  if not is_logged_in:
652
  status_parts.append("⚠️ Not logged in to Hugging Face.")
@@ -655,7 +655,7 @@ with gr.Blocks(title="AI-Powered HF Space App Builder") as ai_builder_tab:
655
  if not model:
656
  status_parts.append("⚠️ Gemini model not selected.")
657
  status_str = " ".join(status_parts)
658
- if not status_str: # Should be ready if status_parts is empty
659
  status_str = "✅ Ready to send commands."
660
 
661
 
 
545
  yield history, None, STATE_IDLE, updated_preview, updated_run, updated_build, 0, None, None, None
546
 
547
  elif state == STATE_COMPLETE:
548
+ pass # No further action needed in this state
549
 
550
 
551
  except Exception as e:
 
553
  history = add_bot_message(history, error_message)
554
  print(f"Critical Error in state {state}: {e}")
555
  yield history, None, STATE_IDLE, updated_preview, updated_run, updated_build, 0, None, None, None
556
+ # Removed the 'return' here
557
 
558
 
559
  # --- Build the Gradio UI ---
 
646
  status_str = ""
647
  if is_logged_in and is_gemini_ready:
648
  status_str = "✅ Ready to send commands."
649
+ else:
650
  status_parts = []
651
  if not is_logged_in:
652
  status_parts.append("⚠️ Not logged in to Hugging Face.")
 
655
  if not model:
656
  status_parts.append("⚠️ Gemini model not selected.")
657
  status_str = " ".join(status_parts)
658
+ if not status_str:
659
  status_str = "✅ Ready to send commands."
660
 
661