Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
from
|
|
|
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 |
|