Bora9 commited on
Commit
6377593
·
verified ·
1 Parent(s): c2713a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -305,7 +305,7 @@ const mat=new THREE.PointsMaterial({size:M.s0,vertexColors:true,sizeAttenuation:
305
  const grid=new THREE.GridHelper(M.R*4,40,0x555a66,0x30343c);grid.position.y=M.floor;sc.add(grid);
306
  const ctl=new THREE.OrbitControls(cam,cv);ctl.enableDamping=true;ctl.screenSpacePanning=true;ctl.autoRotateSpeed=1.2;
307
  function rst(){cam.position.set(0,M.R*.25,M.R*1.9);ctl.target.set(0,0,0);ctl.update()}rst();
308
- const bgs=['#0e1013','#f2f3f5','#1c2a3a'];let bi=0;function setbg(){const c=bgs[bi];document.body.style.background=c;r.setClearColor(c)}setbg();
309
  function sz(){r.setSize(innerWidth,innerHeight,false);cam.aspect=innerWidth/innerHeight;cam.updateProjectionMatrix()}addEventListener('resize',sz);sz();
310
  ps.oninput=e=>mat.size=M.s0*e.target.value;
311
  rot.onclick=()=>{ctl.autoRotate=!ctl.autoRotate;rot.classList.toggle('on',ctl.autoRotate)};
@@ -315,7 +315,7 @@ shot.onclick=()=>{r.render(sc,cam);const a=document.createElement('a');a.href=cv
315
  (function L(){requestAnimationFrame(L);ctl.update();r.render(sc,cam)})();
316
  </script></body></html>"""
317
 
318
- PLACEHOLDER = "<div style='height:640px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#0e1013;color:#7d8590;font-family:system-ui'>🛰️ Model henüz üretilmedi</div>"
319
 
320
 
321
  def build_viewer(P, C, vs, height=680):
@@ -420,15 +420,16 @@ run = spaces.GPU(duration=180)(_pipeline) if HAS_SPACES else _pipeline
420
  # ───────────────────── Arayüz ─────────────────────
421
  CSS = """
422
  .gradio-container{max-width:1400px!important}
423
- #hero{background:linear-gradient(120deg,#1b2433,#2b1d12 70%);border:1px solid #ffffff1a;border-radius:18px;padding:22px 28px;margin-bottom:10px}
424
- #hero h1{margin:0;font-size:28px;letter-spacing:.3px}#hero p{margin:6px 0 0;color:#9aa4b2}
 
425
  #go{background:linear-gradient(90deg,#ff9f43,#ff6b35)!important;border:none!important;color:#111!important;font-weight:700}
426
  """
427
  theme = gr.themes.Base(primary_hue="orange", neutral_hue="slate", font=[gr.themes.GoogleFont("Inter"), "system-ui"])
428
 
429
  with gr.Blocks(title="Fotogrametri & LiDAR 3D Studio PRO", theme=theme, css=CSS,
430
- js="() => {document.body.classList.add('dark')}") as demo:
431
- gr.HTML("<div id='hero'><h1>🛸 Fotogrametri &amp; LiDAR 3D Studio <span style='color:#ff9f43'>PRO</span></h1>"
432
  "<p>Depth Anything V2 · çoklu fotoğraf hizalama · uçan-piksel temizliği · EXIF kamera kalibrasyonu · ikili PLY</p></div>")
433
  with gr.Row():
434
  with gr.Column(scale=1, min_width=340):
@@ -470,4 +471,4 @@ with gr.Blocks(title="Fotogrametri & LiDAR 3D Studio PRO", theme=theme, css=CSS,
470
  do_level, preview_n, use_rtk, lat, lon, alt], [viewer, gal, out_file, report])
471
 
472
  if __name__ == "__main__":
473
- demo.queue().launch(server_name="0.0.0.0", server_port=7860, show_error=True)
 
305
  const grid=new THREE.GridHelper(M.R*4,40,0x555a66,0x30343c);grid.position.y=M.floor;sc.add(grid);
306
  const ctl=new THREE.OrbitControls(cam,cv);ctl.enableDamping=true;ctl.screenSpacePanning=true;ctl.autoRotateSpeed=1.2;
307
  function rst(){cam.position.set(0,M.R*.25,M.R*1.9);ctl.target.set(0,0,0);ctl.update()}rst();
308
+ const bgs=['#f2f3f5','#0e1013','#1c2a3a'];let bi=0;function setbg(){const c=bgs[bi];document.body.style.background=c;r.setClearColor(c)}setbg();
309
  function sz(){r.setSize(innerWidth,innerHeight,false);cam.aspect=innerWidth/innerHeight;cam.updateProjectionMatrix()}addEventListener('resize',sz);sz();
310
  ps.oninput=e=>mat.size=M.s0*e.target.value;
311
  rot.onclick=()=>{ctl.autoRotate=!ctl.autoRotate;rot.classList.toggle('on',ctl.autoRotate)};
 
315
  (function L(){requestAnimationFrame(L);ctl.update();r.render(sc,cam)})();
316
  </script></body></html>"""
317
 
318
+ PLACEHOLDER = "<div style='height:640px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#f2f3f5;color:#64748b;border:1px solid #e2e8f0;font-family:system-ui'>🛰️ Model henüz üretilmedi</div>"
319
 
320
 
321
  def build_viewer(P, C, vs, height=680):
 
420
  # ───────────────────── Arayüz ─────────────────────
421
  CSS = """
422
  .gradio-container{max-width:1400px!important}
423
+ #hero{background:linear-gradient(120deg,#ffffff,#fff1e0 75%);border:1px solid #e2e8f0;border-radius:18px;padding:22px 28px;margin-bottom:10px}
424
+ #hero h1{margin:0;font-size:28px;letter-spacing:.3px;color:#111827!important}
425
+ #hero p{margin:6px 0 0;color:#475569!important}
426
  #go{background:linear-gradient(90deg,#ff9f43,#ff6b35)!important;border:none!important;color:#111!important;font-weight:700}
427
  """
428
  theme = gr.themes.Base(primary_hue="orange", neutral_hue="slate", font=[gr.themes.GoogleFont("Inter"), "system-ui"])
429
 
430
  with gr.Blocks(title="Fotogrametri & LiDAR 3D Studio PRO", theme=theme, css=CSS,
431
+ js="() => {document.body.classList.remove('dark')}") as demo:
432
+ gr.HTML("<div id='hero'><h1>🛸 Fotogrametri &amp; LiDAR 3D Studio <span style='color:#e8590c'>PRO</span></h1>"
433
  "<p>Depth Anything V2 · çoklu fotoğraf hizalama · uçan-piksel temizliği · EXIF kamera kalibrasyonu · ikili PLY</p></div>")
434
  with gr.Row():
435
  with gr.Column(scale=1, min_width=340):
 
471
  do_level, preview_n, use_rtk, lat, lon, alt], [viewer, gal, out_file, report])
472
 
473
  if __name__ == "__main__":
474
+ demo.queue().launch(server_name="0.0.0.0", server_port=7860, show_error=True)