Bc-AI commited on
Commit
c9f40e0
·
verified ·
1 Parent(s): 03e93c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -282,11 +282,7 @@ else:
282
 
283
  model.eval()
284
  # Compile for ~30% CPU speedup (optional, remove if it causes issues)
285
- try:
286
- model = torch.compile(model, mode="reduce-overhead")
287
- print("[init] model compiled")
288
- except Exception as e:
289
- print(f"[init] compile skipped: {e}")
290
 
291
  n_params = sum(p.numel() for p in model.parameters())
292
  print(f"[init] ready | {n_params/1e6:.1f}M params")
@@ -399,7 +395,7 @@ CSS = """
399
  footer { display: none !important; }
400
  """
401
 
402
- with gr.Blocks(css=CSS, title="CodVa-2 Demo") as demo:
403
 
404
  gr.Markdown("""
405
  # 🧠 CodVa-2 — Code Language Model
@@ -487,4 +483,5 @@ if __name__ == "__main__":
487
  server_name="0.0.0.0",
488
  server_port=7860,
489
  show_error=True,
 
490
  )
 
282
 
283
  model.eval()
284
  # Compile for ~30% CPU speedup (optional, remove if it causes issues)
285
+ print("[init] model ready (CPU inference, no compile)")
 
 
 
 
286
 
287
  n_params = sum(p.numel() for p in model.parameters())
288
  print(f"[init] ready | {n_params/1e6:.1f}M params")
 
395
  footer { display: none !important; }
396
  """
397
 
398
+ with gr.Blocks(title="CodVa-2 Demo") as demo:
399
 
400
  gr.Markdown("""
401
  # 🧠 CodVa-2 — Code Language Model
 
483
  server_name="0.0.0.0",
484
  server_port=7860,
485
  show_error=True,
486
+ custom_css=CSS, # <-- moved here
487
  )