Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import subprocess
|
3 |
-
from huggingface_hub import HfApi
|
4 |
-
import spaces
|
5 |
|
6 |
-
@spaces.GPU
|
7 |
def merge_and_upload(weight_drop_prob, scaling_factor, base_model, model_to_merge, output_path, repo_name, token):
|
8 |
# Construct the command to run hf_merge.py
|
9 |
command = [
|
@@ -41,15 +39,15 @@ def merge_and_upload(weight_drop_prob, scaling_factor, base_model, model_to_merg
|
|
41 |
iface = gr.Interface(
|
42 |
fn=merge_and_upload,
|
43 |
inputs=[
|
44 |
-
gr.
|
45 |
-
gr.
|
46 |
-
gr.
|
47 |
-
gr.
|
48 |
-
gr.
|
49 |
-
gr.
|
50 |
-
gr.
|
51 |
],
|
52 |
-
outputs="
|
53 |
title="Model Merger and Uploader",
|
54 |
description="Merge two models using the Super Mario merge method and upload to Hugging Face Hub."
|
55 |
)
|
|
|
1 |
import gradio as gr
|
2 |
import subprocess
|
3 |
+
from huggingface_hub import HfApi
|
|
|
4 |
|
|
|
5 |
def merge_and_upload(weight_drop_prob, scaling_factor, base_model, model_to_merge, output_path, repo_name, token):
|
6 |
# Construct the command to run hf_merge.py
|
7 |
command = [
|
|
|
39 |
iface = gr.Interface(
|
40 |
fn=merge_and_upload,
|
41 |
inputs=[
|
42 |
+
gr.Slider(minimum=0, maximum=1, value=0.13, label="Weight Drop Probability"),
|
43 |
+
gr.Number(value=3.0, label="Scaling Factor"),
|
44 |
+
gr.Textbox(label="Base Model File/Folder"),
|
45 |
+
gr.Textbox(label="Model to Merge"),
|
46 |
+
gr.Textbox(label="Output Path"),
|
47 |
+
gr.Textbox(label="Hugging Face Repo Name"),
|
48 |
+
gr.Textbox(label="Hugging Face Token", type="password")
|
49 |
],
|
50 |
+
outputs=gr.Textbox(label="Output"),
|
51 |
title="Model Merger and Uploader",
|
52 |
description="Merge two models using the Super Mario merge method and upload to Hugging Face Hub."
|
53 |
)
|