Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -644,7 +644,7 @@ def fetch_items(item_type, search_query="", sort_by="rank", limit=1000):
|
|
644 |
def create_interface():
|
645 |
with gr.Blocks(title="HuggingFace Trending Board", css="""
|
646 |
.search-sort-container {
|
647 |
-
background: rgba(255,255,255,0.
|
648 |
border-radius: 15px;
|
649 |
padding: 20px;
|
650 |
margin: 10px 0;
|
@@ -653,32 +653,45 @@ def create_interface():
|
|
653 |
.search-box {
|
654 |
border: 2px solid #e1e1e1;
|
655 |
border-radius: 10px;
|
656 |
-
padding:
|
657 |
transition: all 0.3s ease;
|
|
|
|
|
|
|
658 |
}
|
659 |
.search-box:focus {
|
660 |
border-color: #7b61ff;
|
661 |
box-shadow: 0 0 0 2px rgba(123,97,255,0.2);
|
|
|
662 |
}
|
663 |
.sort-radio {
|
664 |
display: flex;
|
665 |
justify-content: space-between;
|
666 |
gap: 10px;
|
667 |
-
background: #
|
668 |
-
padding:
|
669 |
border-radius: 10px;
|
|
|
|
|
670 |
}
|
671 |
.sort-radio label {
|
672 |
flex: 1;
|
673 |
text-align: center;
|
674 |
-
padding:
|
675 |
-
background:
|
676 |
border-radius: 8px;
|
677 |
cursor: pointer;
|
678 |
transition: all 0.3s ease;
|
|
|
679 |
}
|
680 |
.sort-radio label:hover {
|
681 |
-
background: #
|
|
|
|
|
|
|
|
|
|
|
|
|
682 |
}
|
683 |
.refresh-btn {
|
684 |
background: linear-gradient(135deg, #7b61ff, #6366f1);
|
@@ -688,13 +701,20 @@ def create_interface():
|
|
688 |
border-radius: 10px;
|
689 |
cursor: pointer;
|
690 |
transition: all 0.3s ease;
|
691 |
-
width: 120px; /* ๋ฒํผ ๋๋น
|
|
|
|
|
|
|
|
|
|
|
692 |
}
|
693 |
.refresh-btn:hover {
|
694 |
transform: translateY(-2px);
|
695 |
box-shadow: 0 4px 12px rgba(99,102,241,0.4);
|
|
|
696 |
}
|
697 |
""") as interface:
|
|
|
698 |
gr.Markdown("""
|
699 |
# ๐ค HuggingFace Trending TOP 300 Board
|
700 |
<div style='margin-bottom: 20px; padding: 10px; background: linear-gradient(135deg, rgba(123,97,255,0.1), rgba(99,102,241,0.1)); border-radius: 10px;'>
|
@@ -715,7 +735,7 @@ def create_interface():
|
|
715 |
)
|
716 |
with gr.Column(scale=2):
|
717 |
spaces_sort = gr.Radio(
|
718 |
-
choices=["
|
719 |
value="rank",
|
720 |
label="๐ Sort by",
|
721 |
interactive=True,
|
@@ -742,7 +762,7 @@ def create_interface():
|
|
742 |
)
|
743 |
with gr.Column(scale=2):
|
744 |
models_sort = gr.Radio(
|
745 |
-
choices=["
|
746 |
value="rank",
|
747 |
label="๐ Sort by",
|
748 |
interactive=True,
|
@@ -770,7 +790,7 @@ def create_interface():
|
|
770 |
)
|
771 |
with gr.Column(scale=2):
|
772 |
datasets_sort = gr.Radio(
|
773 |
-
choices=["
|
774 |
value="rank",
|
775 |
label="๐ Sort by",
|
776 |
interactive=True,
|
|
|
644 |
def create_interface():
|
645 |
with gr.Blocks(title="HuggingFace Trending Board", css="""
|
646 |
.search-sort-container {
|
647 |
+
background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,240,255,0.95));
|
648 |
border-radius: 15px;
|
649 |
padding: 20px;
|
650 |
margin: 10px 0;
|
|
|
653 |
.search-box {
|
654 |
border: 2px solid #e1e1e1;
|
655 |
border-radius: 10px;
|
656 |
+
padding: 12px;
|
657 |
transition: all 0.3s ease;
|
658 |
+
background: linear-gradient(135deg, #ffffff, #f8f9ff);
|
659 |
+
width: 150%; /* ๋๋น ์ฆ๊ฐ */
|
660 |
+
margin-right: -50%; /* ์ค๋ฅธ์ชฝ ์ฌ๋ฐฑ ์กฐ์ */
|
661 |
}
|
662 |
.search-box:focus {
|
663 |
border-color: #7b61ff;
|
664 |
box-shadow: 0 0 0 2px rgba(123,97,255,0.2);
|
665 |
+
background: linear-gradient(135deg, #ffffff, #f0f3ff);
|
666 |
}
|
667 |
.sort-radio {
|
668 |
display: flex;
|
669 |
justify-content: space-between;
|
670 |
gap: 10px;
|
671 |
+
background: linear-gradient(135deg, #f5f5ff, #f0f0ff);
|
672 |
+
padding: 12px;
|
673 |
border-radius: 10px;
|
674 |
+
width: 150%; /* ๋๋น ์ฆ๊ฐ */
|
675 |
+
margin-right: -50%; /* ์ค๋ฅธ์ชฝ ์ฌ๋ฐฑ ์กฐ์ */
|
676 |
}
|
677 |
.sort-radio label {
|
678 |
flex: 1;
|
679 |
text-align: center;
|
680 |
+
padding: 10px 15px;
|
681 |
+
background: linear-gradient(135deg, #ffffff, #f8f9ff);
|
682 |
border-radius: 8px;
|
683 |
cursor: pointer;
|
684 |
transition: all 0.3s ease;
|
685 |
+
border: 1px solid rgba(123,97,255,0.1);
|
686 |
}
|
687 |
.sort-radio label:hover {
|
688 |
+
background: linear-gradient(135deg, #f0f3ff, #e8ecff);
|
689 |
+
border-color: rgba(123,97,255,0.3);
|
690 |
+
}
|
691 |
+
.sort-radio input:checked + label {
|
692 |
+
background: linear-gradient(135deg, #7b61ff, #6366f1);
|
693 |
+
color: white;
|
694 |
+
border-color: transparent;
|
695 |
}
|
696 |
.refresh-btn {
|
697 |
background: linear-gradient(135deg, #7b61ff, #6366f1);
|
|
|
701 |
border-radius: 10px;
|
702 |
cursor: pointer;
|
703 |
transition: all 0.3s ease;
|
704 |
+
width: 120px; /* ๋ฒํผ ๋๋น */
|
705 |
+
height: 40px; /* ๋ฒํผ ๋์ด */
|
706 |
+
display: flex;
|
707 |
+
align-items: center;
|
708 |
+
justify-content: center;
|
709 |
+
margin-left: auto; /* ์ค๋ฅธ์ชฝ ์ ๋ ฌ */
|
710 |
}
|
711 |
.refresh-btn:hover {
|
712 |
transform: translateY(-2px);
|
713 |
box-shadow: 0 4px 12px rgba(99,102,241,0.4);
|
714 |
+
background: linear-gradient(135deg, #8b71ff, #7376f1);
|
715 |
}
|
716 |
""") as interface:
|
717 |
+
|
718 |
gr.Markdown("""
|
719 |
# ๐ค HuggingFace Trending TOP 300 Board
|
720 |
<div style='margin-bottom: 20px; padding: 10px; background: linear-gradient(135deg, rgba(123,97,255,0.1), rgba(99,102,241,0.1)); border-radius: 10px;'>
|
|
|
735 |
)
|
736 |
with gr.Column(scale=2):
|
737 |
spaces_sort = gr.Radio(
|
738 |
+
choices=["rank", "rising_rate", "popularity"],
|
739 |
value="rank",
|
740 |
label="๐ Sort by",
|
741 |
interactive=True,
|
|
|
762 |
)
|
763 |
with gr.Column(scale=2):
|
764 |
models_sort = gr.Radio(
|
765 |
+
choices=["rank", "rising_rate", "popularity"],
|
766 |
value="rank",
|
767 |
label="๐ Sort by",
|
768 |
interactive=True,
|
|
|
790 |
)
|
791 |
with gr.Column(scale=2):
|
792 |
datasets_sort = gr.Radio(
|
793 |
+
choices=["rank", "rising_rate", "popularity"],
|
794 |
value="rank",
|
795 |
label="๐ Sort by",
|
796 |
interactive=True,
|