John6666 commited on
Commit
5cf84fa
·
verified ·
1 Parent(s): 0a426ed

Upload 2 files

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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 models"):
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)