Update app.py
Browse files
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,10 @@ def duplicate(source_repo, dst_repo, token, repo_type, private):
|
|
44 |
interface = gr.Interface(
|
45 |
fn=duplicate,
|
46 |
inputs=[
|
47 |
-
|
|
|
|
|
|
|
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 |
+
),
|
52 |
gr.Textbox(placeholder="Destination repository (e.g. osanseviero/dst)"),
|
53 |
gr.Textbox(placeholder="Write access token", type="password"),
|
54 |
gr.Dropdown(choices=REPO_TYPES, value="model"),
|