eraz3r commited on
Commit
95c3af0
Β·
verified Β·
1 Parent(s): 9caa92e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -189,7 +189,7 @@ def handle_parse_text(task_text, user_id):
189
 
190
 
191
  def handle_transcribe_voice(audio_path, user_id):
192
- """Whisper transcription β€” uses faster-whisper (Python 3.13 compatible)."""
193
  if audio_path is None:
194
  return gr.update(visible=False), _err("No audio recorded.")
195
  try:
@@ -583,7 +583,7 @@ def render_context_html(user_id):
583
  # UI BUILD
584
  # ═══════════════════════════════════════════════════════════════════════════════
585
 
586
- with gr.Blocks(css=CSS, title="🧠 Second Brain") as demo:
587
 
588
  # ── Session state ──────────────────────────────────────────────────────────
589
  user_id_state = gr.State(None)
@@ -772,7 +772,7 @@ with gr.Blocks(css=CSS, title="🧠 Second Brain") as demo:
772
  # Step 2 β€” Chat
773
  with gr.Column(elem_classes="panel"):
774
  gr.HTML('<div class="sec-label">Step 2 β€” Reflect</div>')
775
- journal_chatbot = gr.Chatbot(label="", height=380, bubble_full_width=False)
776
  with gr.Row():
777
  btn_j_start = gr.Button("β–Ά Start Reflection", elem_classes="btn-primary", scale=2)
778
  btn_j_finish = gr.Button("βœ“ Finish & Save Insights", elem_classes="btn-success", scale=2)
@@ -1083,4 +1083,4 @@ with gr.Blocks(css=CSS, title="🧠 Second Brain") as demo:
1083
  # ── Launch ─────────────────────────────────────────────────────────────────────
1084
 
1085
  if __name__ == "__main__":
1086
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
189
 
190
 
191
  def handle_transcribe_voice(audio_path, user_id):
192
+ """Whisper transcription then Groq parse β€” same pipeline as notebook."""
193
  if audio_path is None:
194
  return gr.update(visible=False), _err("No audio recorded.")
195
  try:
 
583
  # UI BUILD
584
  # ═══════════════════════════════════════════════════════════════════════════════
585
 
586
+ with gr.Blocks(title="🧠 Second Brain") as demo:
587
 
588
  # ── Session state ──────────────────────────────────────────────────────────
589
  user_id_state = gr.State(None)
 
772
  # Step 2 β€” Chat
773
  with gr.Column(elem_classes="panel"):
774
  gr.HTML('<div class="sec-label">Step 2 β€” Reflect</div>')
775
+ journal_chatbot = gr.Chatbot(label="", height=380)
776
  with gr.Row():
777
  btn_j_start = gr.Button("β–Ά Start Reflection", elem_classes="btn-primary", scale=2)
778
  btn_j_finish = gr.Button("βœ“ Finish & Save Insights", elem_classes="btn-success", scale=2)
 
1083
  # ── Launch ─────────────────────────────────────────────────────────────────────
1084
 
1085
  if __name__ == "__main__":
1086
+ demo.launch(server_name="0.0.0.0", server_port=7860, css=CSS)