stanley-00 commited on
Commit
55c8db2
·
verified ·
1 Parent(s): 716699c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -4
app.py CHANGED
@@ -9,6 +9,23 @@ import psutil
9
  # Define path for HF cache to clean
10
  HF_CACHE_DIR = os.path.expanduser("~/.cache/huggingface/hub")
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  def get_system_stats():
13
  """Returns a dictionary of current system metrics with formatted strings."""
14
  mem = psutil.virtual_memory()
@@ -54,9 +71,7 @@ def clean_cache():
54
  return "Cache directory not found."
55
 
56
  # Gradio Interface
57
- with gr.Blocks(title="Small Model Tester") as app:
58
- gr.Markdown("# Advanced HF Model Tester (Free Tier)")
59
-
60
 
61
  current_model = gr.State(None)
62
 
@@ -69,7 +84,7 @@ with gr.Blocks(title="Small Model Tester") as app:
69
  gr.Timer(5).tick(get_system_stats, None, stats_output)
70
 
71
  with gr.Row():
72
- model_id_input = gr.Textbox(label="Model ID", value="AxiomicLabs/GPT-S-5M", placeholder="e.g., AxiomicLabs/GPT-S-5M", show_label=False)
73
  load_btn = gr.Button("Load", variant="secondary")
74
 
75
  max_tokens_input = gr.Slider(minimum=10, maximum=1024, value=128, step=1, label="Max Output Tokens")
 
9
  # Define path for HF cache to clean
10
  HF_CACHE_DIR = os.path.expanduser("~/.cache/huggingface/hub")
11
 
12
+ # List of models for autocomplete
13
+ MODELS = [
14
+ 'HuggingFaceTB/SmolLM2-135M', 'AxiomicLabs/GPT-X2-125M', 'AxiomicLabs/GPT-X-125M',
15
+ 'facebook/MobileLLM-R1-140M-base', 'SupraLabs/Supra-50M-Base', 'CompactAI-O/Shard-1',
16
+ 'SupraLabs/Supra-50M-Instruct', 'HuggingFaceTB/SmolLM-135M', 'facebook/opt-125m',
17
+ 'AxiomicLabs/GPT-S-5M', 'openai-community/gpt2', 'LH-Tech-AI/Spark-5M-Base-v4',
18
+ 'SupraLabs/Supra-Mini-v5-8M', 'EleutherAI/pythia-70m', 'SupraLabs/Supra-Mini-v4-2M',
19
+ 'EleutherAI/pythia-31m', 'StentorLabs/Stentor3-50M', 'StentorLabs/Stentor3-20M',
20
+ 'StentorLabs/Portimbria-150M', 'HuggingFaceTB/nanowhale-100m-base', 'EleutherAI/pythia-14m',
21
+ 'Harley-ml/Tenete-8M', 'Harley-ml/Dillion-1.2M', 'MihaiPopa-1/CinnabarLM-1.4M-Base',
22
+ 'MihaiPopa-1/CinnabarLM-4M-Base', 'MihaiPopa-1/PotentSulfurLM-500K-Base',
23
+ 'MihaiPopa-1/CinnabarLM-1.5M-Base', 'Harley-ml/Dillionv2-1.3M', 'Eclipse-Senpai/KeyLM-75M',
24
+ 'SupraLabs/Supra-Mini-v6-1M', 'AxiomicLabs/GPT-S-1.4M', 'GODELEV/Archaea-74M',
25
+ 'Sandroeth/cali-0.1B', 'veyra-ai/veyra3-5m-base', 'veyra-ai/veyra-30m-base-5b-tokens',
26
+ 'ThingAI/Quark-50m', 'ThingAI/Quark-135m'
27
+ ]
28
+
29
  def get_system_stats():
30
  """Returns a dictionary of current system metrics with formatted strings."""
31
  mem = psutil.virtual_memory()
 
71
  return "Cache directory not found."
72
 
73
  # Gradio Interface
74
+ with gr.Blocks(title="Small MF Model Tester") as app:
 
 
75
 
76
  current_model = gr.State(None)
77
 
 
84
  gr.Timer(5).tick(get_system_stats, None, stats_output)
85
 
86
  with gr.Row():
87
+ model_id_input = gr.Dropdown(choices=MODELS, label="Model", allow_custom_value=True)
88
  load_btn = gr.Button("Load", variant="secondary")
89
 
90
  max_tokens_input = gr.Slider(minimum=10, maximum=1024, value=128, step=1, label="Max Output Tokens")