acecalisto3 commited on
Commit
15560b7
·
verified ·
1 Parent(s): 94dc208

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,9 @@
1
- from transformers import HfApi, pipeline
 
2
 
3
  # Function to merge models at equal weights
4
  def merge_models(models):
5
- model_weights = [1.0 / len(models) for _ in range(len(models))]
6
  merged_model = pipeline("text-generation", model=models, model_weights=model_weights)
7
  return merged_model
8
 
 
1
+ from huggingface_hub import HfApi
2
+ from transformers import pipeline
3
 
4
  # Function to merge models at equal weights
5
  def merge_models(models):
6
+ model_weights = [1.0 / len(models) for _ in range(len(models)]
7
  merged_model = pipeline("text-generation", model=models, model_weights=model_weights)
8
  return merged_model
9