qwerty45-uiop commited on
Commit
e2fb4ba
Β·
verified Β·
1 Parent(s): e34ca5d

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +1 -26
src/streamlit_app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  #!/usr/bin/env python3
3
  """
4
  LLM Compatibility Advisor - Streamlined with Download Sizes
@@ -224,26 +223,6 @@ def recommend_llm(ram_str) -> Tuple[str, str, str, Dict[str, List[Dict]]]:
224
  "Research grade, maximum performance, domain expertise",
225
  models)
226
 
227
- # Enhanced OS detection with better icons
228
- def get_os_info(os_name) -> Tuple[str, str]:
229
- """Returns (icon, clean_name)"""
230
- if pd.isna(os_name):
231
- return "πŸ’»", "Not specified"
232
-
233
- os = str(os_name).lower()
234
- if "windows" in os:
235
- return "πŸͺŸ", os_name
236
- elif "mac" in os or "darwin" in os:
237
- return "🍎", os_name
238
- elif "linux" in os or "ubuntu" in os:
239
- return "🐧", os_name
240
- elif "android" in os:
241
- return "πŸ€–", os_name
242
- elif "ios" in os:
243
- return "πŸ“±", os_name
244
- else:
245
- return "πŸ’»", os_name
246
-
247
  # Performance visualization
248
  def create_performance_chart(df):
249
  """Create a performance distribution chart"""
@@ -361,12 +340,10 @@ if selected_user:
361
 
362
  with col1:
363
  st.markdown("### πŸ’» Laptop Configuration")
364
- laptop_os_icon, laptop_os_name = get_os_info(user_data.get('Laptop Operating System'))
365
  laptop_ram = user_data.get('Laptop RAM', 'Not specified')
366
  laptop_rec, laptop_tier, laptop_info, laptop_models = recommend_llm(laptop_ram)
367
  laptop_ram_gb = extract_numeric_ram(laptop_ram) or 0
368
 
369
- st.markdown(f"**OS:** {laptop_os_icon} {laptop_os_name}")
370
  st.markdown(f"**RAM:** {laptop_ram}")
371
  st.markdown(f"**Performance Tier:** {laptop_tier}")
372
 
@@ -380,12 +357,10 @@ if selected_user:
380
 
381
  with col2:
382
  st.markdown("### πŸ“± Mobile Configuration")
383
- mobile_os_icon, mobile_os_name = get_os_info(user_data.get('Mobile Operating System'))
384
  mobile_ram = user_data.get('Mobile RAM', 'Not specified')
385
  mobile_rec, mobile_tier, mobile_info, mobile_models = recommend_llm(mobile_ram)
386
  mobile_ram_gb = extract_numeric_ram(mobile_ram) or 0
387
 
388
- st.markdown(f"**OS:** {mobile_os_icon} {mobile_os_name}")
389
  st.markdown(f"**RAM:** {mobile_ram}")
390
  st.markdown(f"**Performance Tier:** {mobile_tier}")
391
 
@@ -415,7 +390,7 @@ df_display["Mobile LLM"] = mobile_recommendations
415
  df_display["Laptop Tier"] = laptop_tiers
416
  df_display["Mobile Tier"] = mobile_tiers
417
 
418
- # Filter based on sidebar selections (RAM range filter removed)
419
  mask = (laptop_tiers.isin(performance_filter) | mobile_tiers.isin(performance_filter))
420
 
421
  df_filtered = df_display[mask]
 
 
1
  #!/usr/bin/env python3
2
  """
3
  LLM Compatibility Advisor - Streamlined with Download Sizes
 
223
  "Research grade, maximum performance, domain expertise",
224
  models)
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  # Performance visualization
227
  def create_performance_chart(df):
228
  """Create a performance distribution chart"""
 
340
 
341
  with col1:
342
  st.markdown("### πŸ’» Laptop Configuration")
 
343
  laptop_ram = user_data.get('Laptop RAM', 'Not specified')
344
  laptop_rec, laptop_tier, laptop_info, laptop_models = recommend_llm(laptop_ram)
345
  laptop_ram_gb = extract_numeric_ram(laptop_ram) or 0
346
 
 
347
  st.markdown(f"**RAM:** {laptop_ram}")
348
  st.markdown(f"**Performance Tier:** {laptop_tier}")
349
 
 
357
 
358
  with col2:
359
  st.markdown("### πŸ“± Mobile Configuration")
 
360
  mobile_ram = user_data.get('Mobile RAM', 'Not specified')
361
  mobile_rec, mobile_tier, mobile_info, mobile_models = recommend_llm(mobile_ram)
362
  mobile_ram_gb = extract_numeric_ram(mobile_ram) or 0
363
 
 
364
  st.markdown(f"**RAM:** {mobile_ram}")
365
  st.markdown(f"**Performance Tier:** {mobile_tier}")
366
 
 
390
  df_display["Laptop Tier"] = laptop_tiers
391
  df_display["Mobile Tier"] = mobile_tiers
392
 
393
+ # Filter based on sidebar selections
394
  mask = (laptop_tiers.isin(performance_filter) | mobile_tiers.isin(performance_filter))
395
 
396
  df_filtered = df_display[mask]