MCPcopy
hub / github.com/HKUDS/DeepCode / launch_classic_ui

Function launch_classic_ui

deepcode.py:369โ€“411  ยท  view source on GitHub โ†—

Launch classic Streamlit UI

()

Source from the content-addressed store, hash-verified

367
368
369def launch_classic_ui():
370 """Launch classic Streamlit UI"""
371 import importlib.util
372
373 print("๐ŸŒ Launching Classic Streamlit UI...")
374
375 # Check if Streamlit is installed
376 if importlib.util.find_spec("streamlit") is None:
377 print("โŒ Streamlit is not installed.")
378 print("Install with: pip install streamlit")
379 sys.exit(1)
380
381 current_dir = Path(__file__).parent
382 streamlit_app_path = current_dir / "ui" / "streamlit_app.py"
383
384 if not streamlit_app_path.exists():
385 print(f"โŒ Streamlit app not found: {streamlit_app_path}")
386 sys.exit(1)
387
388 print(f"๐Ÿ“ UI App: {streamlit_app_path}")
389 print("๐Ÿš€ Launching on http://localhost:8501")
390 print("=" * 70)
391
392 try:
393 cmd = [
394 sys.executable,
395 "-m",
396 "streamlit",
397 "run",
398 str(streamlit_app_path),
399 "--server.port",
400 "8501",
401 "--server.address",
402 "localhost",
403 "--browser.gatherUsageStats",
404 "false",
405 ]
406 subprocess.run(cmd, check=True)
407 except KeyboardInterrupt:
408 print("\n\n๐Ÿ›‘ Streamlit server stopped by user")
409 except Exception as e:
410 print(f"\nโŒ Error: {e}")
411 sys.exit(1)
412
413
414def _check_docker_prerequisites():

Callers 1

mainFunction ยท 0.85

Calls 1

runMethod ยท 0.80

Tested by

no test coverage detected