qwerty45-uiop commited on
Commit
dc8478e
Β·
verified Β·
1 Parent(s): 26a5b10

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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 organized by category with download sizes"""
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[:8]: # Limit to top 8 per category
347
- col1, col2, col3 = st.columns([3, 1, 2])
348
- with col1:
349
- st.markdown(f"**{model['name']}**")
350
- with col2:
351
- st.markdown(f"{model['size']}")
352
- with col3:
353
- st.markdown(f"*{model['description']}*")
 
 
 
 
 
 
 
 
 
 
 
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():