Tech-Meld commited on
Commit
3e5d73a
·
verified ·
1 Parent(s): 3ff4107

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -7,14 +7,13 @@ import os
7
  import matplotlib.pyplot as plt
8
  from io import BytesIO
9
  import base64
10
- from transformers.models.auto import AutoModel
11
- from transformers.modeling_utils import PreTrainedModel
12
- import torch
13
- from torch.nn.utils import prune
14
 
15
  # Function to fetch open-weight LLM models
16
  def fetch_open_weight_models():
17
- models = list_models(filter="open-weight", sort="downloads", limit=12)
18
  return [model["id"] for model in models]
19
 
20
  # Function to prune a model using the "merge-kit" approach
 
7
  import matplotlib.pyplot as plt
8
  from io import BytesIO
9
  import base64
10
+
11
+ # Choose your backend (PyTorch, TensorFlow, or Flax)
12
+ import torch # If using PyTorch
 
13
 
14
  # Function to fetch open-weight LLM models
15
  def fetch_open_weight_models():
16
+ models = list_models(filter="open-weight", sort="downloads", limit=10)
17
  return [model["id"] for model in models]
18
 
19
  # Function to prune a model using the "merge-kit" approach