Spaces:
Runtime error
Runtime error
Commit
·
a87de4c
1
Parent(s):
5f6ba44
update descriptions
Browse files
app.py
CHANGED
@@ -534,18 +534,20 @@ def search_hub(query: str, min_score=None, min_model_card_length=None):
|
|
534 |
|
535 |
with gr.Blocks() as demo:
|
536 |
with gr.Tab("Search"):
|
537 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
538 |
gr.Markdown(
|
539 |
-
"""This
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
If there is interest in this app I will expose more options for filtering and sorting results.
|
548 |
-
"""
|
549 |
)
|
550 |
with gr.Row():
|
551 |
with gr.Column():
|
@@ -559,9 +561,12 @@ with gr.Blocks() as demo:
|
|
559 |
mim_model_card_length = gr.Number(
|
560 |
100, label="Minimum model card length"
|
561 |
)
|
562 |
-
min_metadata_score = gr.Slider(
|
563 |
-
|
564 |
-
|
|
|
|
|
|
|
565 |
button.click(
|
566 |
search_hub,
|
567 |
[query, min_metadata_score, mim_model_card_length],
|
|
|
534 |
|
535 |
with gr.Blocks() as demo:
|
536 |
with gr.Tab("Search"):
|
537 |
+
gr.HTML(
|
538 |
+
"""
|
539 |
+
<h1 style="text-align: center;">MetaRefine </h1>
|
540 |
+
<p style="text-align: center;">✨ <em>Hub model search results by metadata quality.</em> ✨</p>
|
541 |
+
"""
|
542 |
+
)
|
543 |
gr.Markdown(
|
544 |
+
"""This app enables you to perform full-text searches on the Hugging Face Hub for machine learning models.
|
545 |
+
You can search by keyword or phrase and filter results by metadata quality.
|
546 |
+
Optionally, you can set a minimum model card length or metadata quality score to refine your results.
|
547 |
+
Models are ranked based on metadata quality, with higher scores receiving priority.
|
548 |
+
In case of equal scores, the original search order determines the ranking.
|
549 |
+
More filtering and sorting options may be added based on user interest!
|
550 |
+
"""
|
|
|
|
|
|
|
551 |
)
|
552 |
with gr.Row():
|
553 |
with gr.Column():
|
|
|
561 |
mim_model_card_length = gr.Number(
|
562 |
100, label="Minimum model card length"
|
563 |
)
|
564 |
+
min_metadata_score = gr.Slider(
|
565 |
+
0, 100, 50, label="Minimum metadata score"
|
566 |
+
)
|
567 |
+
gr.Markdown("## Search results")
|
568 |
+
filter_results = gr.Markdown()
|
569 |
+
results_markdown = gr.Markdown()
|
570 |
button.click(
|
571 |
search_hub,
|
572 |
[query, min_metadata_score, mim_model_card_length],
|