one more try
Browse files
README.md
CHANGED
|
@@ -3,9 +3,7 @@ title: Repo Info
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: indigo
|
| 6 |
-
sdk:
|
| 7 |
-
sdk_version: 5.5.0
|
| 8 |
-
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
short_description: Get file and branch stats about any public repo
|
| 11 |
---
|
|
|
|
| 3 |
emoji: π
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: indigo
|
| 6 |
+
sdk: docker
|
|
|
|
|
|
|
| 7 |
pinned: false
|
| 8 |
short_description: Get file and branch stats about any public repo
|
| 9 |
---
|
app.py
CHANGED
|
@@ -5,6 +5,7 @@ from huggingface_hub import HfApi
|
|
| 5 |
from huggingface_hub.errors import RepositoryNotFoundError
|
| 6 |
import pandas as pd
|
| 7 |
import plotly.express as px
|
|
|
|
| 8 |
|
| 9 |
HF_API = HfApi()
|
| 10 |
|
|
@@ -118,14 +119,12 @@ with gr.Blocks(theme="ocean") as demo:
|
|
| 118 |
"Enter a repository ID and repository type and get back information about the repository's files and branches."
|
| 119 |
)
|
| 120 |
with gr.Blocks():
|
| 121 |
-
repo_id = gr.Textbox(label="Repository ID", placeholder="123456")
|
| 122 |
-
"""
|
| 123 |
repo_id = HuggingfaceHubSearch(
|
| 124 |
label="Hub Model ID",
|
| 125 |
placeholder="Search for model id on Huggingface",
|
| 126 |
search_type=["model", "dataset"],
|
| 127 |
)
|
| 128 |
-
"""
|
| 129 |
repo_type = gr.Radio(
|
| 130 |
choices=["model", "dataset", "space"],
|
| 131 |
label="Repository Type",
|
|
|
|
| 5 |
from huggingface_hub.errors import RepositoryNotFoundError
|
| 6 |
import pandas as pd
|
| 7 |
import plotly.express as px
|
| 8 |
+
from gradio_huggingfacehub_search import HuggingfaceHubSearch
|
| 9 |
|
| 10 |
HF_API = HfApi()
|
| 11 |
|
|
|
|
| 119 |
"Enter a repository ID and repository type and get back information about the repository's files and branches."
|
| 120 |
)
|
| 121 |
with gr.Blocks():
|
| 122 |
+
# repo_id = gr.Textbox(label="Repository ID", placeholder="123456")
|
|
|
|
| 123 |
repo_id = HuggingfaceHubSearch(
|
| 124 |
label="Hub Model ID",
|
| 125 |
placeholder="Search for model id on Huggingface",
|
| 126 |
search_type=["model", "dataset"],
|
| 127 |
)
|
|
|
|
| 128 |
repo_type = gr.Radio(
|
| 129 |
choices=["model", "dataset", "space"],
|
| 130 |
label="Repository Type",
|