mrcuddle commited on
Commit
03295cc
·
verified ·
1 Parent(s): ba2f577

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -1,9 +1,7 @@
1
  import gradio as gr
2
  import subprocess
3
- from huggingface_hub import HfApi, HfFolder
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.inputs.Slider(minimum=0, maximum=1, default=0.13, label="Weight Drop Probability"),
45
- gr.inputs.Number(default=3.0, label="Scaling Factor"),
46
- gr.inputs.Textbox(label="Base Model File/Folder"),
47
- gr.inputs.Textbox(label="Model to Merge"),
48
- gr.inputs.Textbox(label="Output Path"),
49
- gr.inputs.Textbox(label="Hugging Face Repo Name"),
50
- gr.inputs.Textbox(label="Hugging Face Token", type="password")
51
  ],
52
- outputs="text",
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
  )