Upload 2 files
Browse files
app.py
CHANGED
|
@@ -6,13 +6,15 @@ from hfsearch import (HFSearchResult, search, update_filter, update_df, get_labe
|
|
| 6 |
from gradio_huggingfacehub_search import HuggingfaceHubSearch
|
| 7 |
|
| 8 |
CSS = """
|
|
|
|
|
|
|
| 9 |
.title { align-items: center; text-align: center; }
|
| 10 |
.info { align-items: center; text-align: center; }
|
| 11 |
"""
|
| 12 |
|
| 13 |
-
with gr.Blocks(theme="NoCrypt/miku", fill_width=True, css=CSS) as demo:
|
| 14 |
gr.Markdown("# Search Hugging Face🤗", elem_classes="title")
|
| 15 |
-
with gr.Column():
|
| 16 |
search_result = gr.State(value=HFSearchResult())
|
| 17 |
with gr.Tab("Search"):
|
| 18 |
with gr.Group():
|
|
@@ -67,7 +69,7 @@ with gr.Blocks(theme="NoCrypt/miku", fill_width=True, css=CSS) as demo:
|
|
| 67 |
with gr.Row(equal_height=True):
|
| 68 |
show_labels = gr.CheckboxGroup(label="Show items", choices=get_labels(), value=get_valid_labels())
|
| 69 |
run_button = gr.Button("Search", variant="primary")
|
| 70 |
-
with gr.Tab("Inference API
|
| 71 |
with gr.Group():
|
| 72 |
with gr.Row(equal_height=True):
|
| 73 |
infer_repo_types = gr.CheckboxGroup(label="Repo type", choices=["model", "dataset", "space"], value=["model"], visible=False)
|
|
|
|
| 6 |
from gradio_huggingfacehub_search import HuggingfaceHubSearch
|
| 7 |
|
| 8 |
CSS = """
|
| 9 |
+
#container { margin: 0 auto; !important; }
|
| 10 |
+
#col-container { margin: 0 auto; !important; }
|
| 11 |
.title { align-items: center; text-align: center; }
|
| 12 |
.info { align-items: center; text-align: center; }
|
| 13 |
"""
|
| 14 |
|
| 15 |
+
with gr.Blocks(theme="NoCrypt/miku", elem_id="container", fill_width=True, css=CSS) as demo:
|
| 16 |
gr.Markdown("# Search Hugging Face🤗", elem_classes="title")
|
| 17 |
+
with gr.Column(elem_id="col-container"):
|
| 18 |
search_result = gr.State(value=HFSearchResult())
|
| 19 |
with gr.Tab("Search"):
|
| 20 |
with gr.Group():
|
|
|
|
| 69 |
with gr.Row(equal_height=True):
|
| 70 |
show_labels = gr.CheckboxGroup(label="Show items", choices=get_labels(), value=get_valid_labels())
|
| 71 |
run_button = gr.Button("Search", variant="primary")
|
| 72 |
+
with gr.Tab("Inference API"):
|
| 73 |
with gr.Group():
|
| 74 |
with gr.Row(equal_height=True):
|
| 75 |
infer_repo_types = gr.CheckboxGroup(label="Repo type", choices=["model", "dataset", "space"], value=["model"], visible=False)
|