TheCoderScientist commited on
Commit
36d70d7
·
verified ·
1 Parent(s): 7e4b910

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -1,6 +1,7 @@
1
  # ==============================================================================
2
  # 🦅 GarudaCoder-27B — Indonesian Coding Intelligence
3
  # Precision Engineered Interface (Hugging Face ZeroGPU Edition)
 
4
  # ==============================================================================
5
 
6
  import os
@@ -246,7 +247,7 @@ def sources_html(results):
246
  return f'<div class="sources-grid">{"".join(chips)}</div>'
247
 
248
  # ==============================================================================
249
- # 4. CHAT GENERATION ENGINE
250
  # ==============================================================================
251
  @spaces.GPU(duration=120)
252
  def generate_chat(
@@ -547,7 +548,10 @@ body, .gradio-container {
547
  }
548
  """
549
 
550
- with gr.Blocks(title="GarudaCoder-27B", css=CSS, theme=gr.themes.Base()) as demo:
 
 
 
551
  # ------------------ TOP NAV BAR ------------------
552
  gr.HTML("""
553
  <div class="app-nav">
@@ -587,8 +591,8 @@ with gr.Blocks(title="GarudaCoder-27B", css=CSS, theme=gr.themes.Base()) as demo
587
 
588
  # ------------------ CHAT WORKSPACE ------------------
589
  with gr.Column(scale=3):
 
590
  chatbot = gr.Chatbot(
591
- type="messages",
592
  value=[{"role": "assistant", "content": WELCOME_MD}],
593
  height=620,
594
  show_label=False,
@@ -649,5 +653,9 @@ with gr.Blocks(title="GarudaCoder-27B", css=CSS, theme=gr.themes.Base()) as demo
649
  outputs=[chatbot, sources_box]
650
  )
651
 
 
652
  if __name__ == "__main__":
653
- demo.queue(max_size=16, default_concurrency_limit=1).launch()
 
 
 
 
1
  # ==============================================================================
2
  # 🦅 GarudaCoder-27B — Indonesian Coding Intelligence
3
  # Precision Engineered Interface (Hugging Face ZeroGPU Edition)
4
+ # Fully Compatible with Gradio 6.x & ZeroGPU A100
5
  # ==============================================================================
6
 
7
  import os
 
247
  return f'<div class="sources-grid">{"".join(chips)}</div>'
248
 
249
  # ==============================================================================
250
+ # 4. CHAT GENERATION ENGINE (ZEROGPU A100)
251
  # ==============================================================================
252
  @spaces.GPU(duration=120)
253
  def generate_chat(
 
548
  }
549
  """
550
 
551
+ # ==============================================================================
552
+ # 6. GRADIO 6.x COMPATIBLE BLOCKS & LAUNCH
553
+ # ==============================================================================
554
+ with gr.Blocks(title="GarudaCoder-27B") as demo:
555
  # ------------------ TOP NAV BAR ------------------
556
  gr.HTML("""
557
  <div class="app-nav">
 
591
 
592
  # ------------------ CHAT WORKSPACE ------------------
593
  with gr.Column(scale=3):
594
+ # Pada Gradio 6, type="messages" dihapus karena sudah jadi format standar bawaan
595
  chatbot = gr.Chatbot(
 
596
  value=[{"role": "assistant", "content": WELCOME_MD}],
597
  height=620,
598
  show_label=False,
 
653
  outputs=[chatbot, sources_box]
654
  )
655
 
656
+ # launch() di Gradio 6 menerima parameter theme dan css langsung di sini
657
  if __name__ == "__main__":
658
+ demo.queue(max_size=16, default_concurrency_limit=1).launch(
659
+ theme=gr.themes.Base(),
660
+ css=CSS
661
+ )