GirishaBuilds01 commited on
Commit
49539a5
·
verified ·
1 Parent(s): 716e4bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -2
app.py CHANGED
@@ -6,7 +6,7 @@ from uei_core.models import ModelPortfolio
6
  from uei_core.uncertainty import UncertaintyEstimator
7
  from uei_core.energy import EnergyProfiler
8
  from uei_core.policy import UEIPolicy
9
-
10
  device = "cpu" # M1 CPU is optimized enough; GPU optional
11
 
12
  models = ModelPortfolio(device=device)
@@ -61,5 +61,21 @@ demo = gr.Interface(
61
  description="Energy-efficient inference by dynamically selecting models based on uncertainty-energy tradeoffs."
62
  )
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  if __name__ == "__main__":
65
- demo.launch()
 
6
  from uei_core.uncertainty import UncertaintyEstimator
7
  from uei_core.energy import EnergyProfiler
8
  from uei_core.policy import UEIPolicy
9
+ from visuals import get_visual_ui
10
  device = "cpu" # M1 CPU is optimized enough; GPU optional
11
 
12
  models = ModelPortfolio(device=device)
 
61
  description="Energy-efficient inference by dynamically selecting models based on uncertainty-energy tradeoffs."
62
  )
63
 
64
+ # ---------------------------
65
+ # NEW UI: Add Visualization Tab
66
+ # ---------------------------
67
+ visual_tab = get_visual_ui()
68
+
69
+ app = gr.TabbedInterface(
70
+ [
71
+ demo, # your original UEI inference app
72
+ visual_tab # new visualization dashboard
73
+ ],
74
+ [
75
+ "UEI Inference",
76
+ "Visual Dashboard"
77
+ ]
78
+ )
79
+
80
  if __name__ == "__main__":
81
+ app.launch()