Update src/streamlit_app.py
Browse files- src/streamlit_app.py +21 -10
src/streamlit_app.py
CHANGED
@@ -333,8 +333,8 @@ def create_performance_chart(df):
|
|
333 |
return fig
|
334 |
|
335 |
# Enhanced model details display function
|
336 |
-
def display_model_categories(models_dict: Dict[str, List[Dict]], ram_gb: int):
|
337 |
-
"""Display models
|
338 |
if not models_dict:
|
339 |
return
|
340 |
|
@@ -343,14 +343,25 @@ def display_model_categories(models_dict: Dict[str, List[Dict]], ram_gb: int):
|
|
343 |
for category, model_list in models_dict.items():
|
344 |
if model_list:
|
345 |
with st.expander(f"π {category.replace('_', ' ').title()} Models"):
|
346 |
-
for model in model_list[:
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
|
355 |
# Demo data generator for when Excel files are not available
|
356 |
def generate_demo_data():
|
|
|
333 |
return fig
|
334 |
|
335 |
# Enhanced model details display function
|
336 |
+
def display_model_categories(models_dict: Dict[str, List[Dict]], ram_gb: int, show_quantization=True):
|
337 |
+
"""Display models with quantization options"""
|
338 |
if not models_dict:
|
339 |
return
|
340 |
|
|
|
343 |
for category, model_list in models_dict.items():
|
344 |
if model_list:
|
345 |
with st.expander(f"π {category.replace('_', ' ').title()} Models"):
|
346 |
+
for model in model_list[:6]: # Reduced to show quantization options
|
347 |
+
st.markdown(f"**{model['name']}**")
|
348 |
+
st.markdown(f"*{model['description']}*")
|
349 |
+
|
350 |
+
if show_quantization:
|
351 |
+
# Create quantization size table
|
352 |
+
quant_cols = st.columns(4)
|
353 |
+
for i, (quant_type, quant_info) in enumerate(QUANTIZATION_FORMATS.items()):
|
354 |
+
with quant_cols[i]:
|
355 |
+
quant_size = calculate_quantized_size(model['size'], quant_type)
|
356 |
+
st.metric(
|
357 |
+
label=quant_type,
|
358 |
+
value=quant_size,
|
359 |
+
help=quant_info['description']
|
360 |
+
)
|
361 |
+
else:
|
362 |
+
st.markdown(f"**Original Size:** {model['size']}")
|
363 |
+
|
364 |
+
st.markdown("---")
|
365 |
|
366 |
# Demo data generator for when Excel files are not available
|
367 |
def generate_demo_data():
|