Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +6 -1
  3. requirements.txt +2 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 😻
4
  colorFrom: gray
5
  colorTo: blue
6
  sdk: gradio
7
- sdk_version: 4.12.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: gray
5
  colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 4.26.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import requests
3
  from huggingface_hub import whoami
4
  from huggingface_hub.utils import build_hf_headers, hf_raise_for_status
 
5
 
6
  ENDPOINT = "https://huggingface.co"
7
  # ENDPOINT = "http://localhost:5564"
@@ -44,7 +45,11 @@ def duplicate(source_repo, dst_repo, token, repo_type, private):
44
  interface = gr.Interface(
45
  fn=duplicate,
46
  inputs=[
47
- gr.Textbox(placeholder="Source repository (e.g. osanseviero/src)"),
 
 
 
 
48
  gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)"),
49
  gr.Textbox(placeholder="Write access token", type="password"),
50
  gr.Dropdown(choices=REPO_TYPES, value="model"),
 
2
  import requests
3
  from huggingface_hub import whoami
4
  from huggingface_hub.utils import build_hf_headers, hf_raise_for_status
5
+ from gradio_huggingfacehub_search import HuggingfaceHubSearch
6
 
7
  ENDPOINT = "https://huggingface.co"
8
  # ENDPOINT = "http://localhost:5564"
 
45
  interface = gr.Interface(
46
  fn=duplicate,
47
  inputs=[
48
+ HuggingfaceHubSearch(
49
+ placeholder="Source repository (e.g. osanseviero/src)",
50
+ search_type=["model", "dataset", "space"],
51
+ sumbit_on_select=False,
52
+ ),
53
  gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)"),
54
  gr.Textbox(placeholder="Write access token", type="password"),
55
  gr.Dropdown(choices=REPO_TYPES, value="model"),
requirements.txt CHANGED
@@ -1 +1,2 @@
1
- huggingface_hub==0.11.0
 
 
1
+ huggingface_hub==0.22.2
2
+ gradio_huggingfacehub_search==0.0.7