Update app.py
Browse files
app.py
CHANGED
@@ -653,13 +653,10 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
653 |
likes = [space.get('likes', 0) for space in spaces]
|
654 |
titles = [space.get('cardData', {}).get('title') or space.get('title', 'No Title') for space in spaces]
|
655 |
|
656 |
-
# Y์ถ
|
657 |
-
y_values = [301 - r for r in ranks]
|
658 |
-
|
659 |
-
# ๋ง๋ ๊ทธ๋ํ ์์ฑ
|
660 |
fig.add_trace(go.Bar(
|
661 |
x=ids,
|
662 |
-
y=
|
663 |
text=[f"Rank: {r}<br>Title: {t}<br>Likes: {l}"
|
664 |
for r, t, l in zip(ranks, titles, likes)],
|
665 |
textposition='auto',
|
@@ -678,8 +675,10 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
678 |
xaxis_title='Space ID',
|
679 |
yaxis_title='Rank',
|
680 |
yaxis=dict(
|
681 |
-
|
682 |
-
|
|
|
|
|
683 |
range=[0, 400]
|
684 |
),
|
685 |
height=800,
|
@@ -703,7 +702,6 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
703 |
title = space.get('cardData', {}).get('title') or space.get('title', 'No Title')
|
704 |
likes = space.get('likes', 0)
|
705 |
|
706 |
-
# ์คํ์ด์ค ํจ์์ HTML ์นด๋ ์์ฑ ๋ถ๋ถ ์์
|
707 |
html_content += f"""
|
708 |
<div style='
|
709 |
background: white;
|
@@ -740,8 +738,6 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
740 |
</a>
|
741 |
</div>
|
742 |
"""
|
743 |
-
|
744 |
-
|
745 |
|
746 |
html_content += "</div></div>"
|
747 |
|
|
|
653 |
likes = [space.get('likes', 0) for space in spaces]
|
654 |
titles = [space.get('cardData', {}).get('title') or space.get('title', 'No Title') for space in spaces]
|
655 |
|
656 |
+
# ๋ง๋ ๊ทธ๋ํ ์์ฑ (Y์ถ ๊ฐ ๊ณ์ฐ ์์ )
|
|
|
|
|
|
|
657 |
fig.add_trace(go.Bar(
|
658 |
x=ids,
|
659 |
+
y=ranks, # ์ง์ rank ๊ฐ ์ฌ์ฉ
|
660 |
text=[f"Rank: {r}<br>Title: {t}<br>Likes: {l}"
|
661 |
for r, t, l in zip(ranks, titles, likes)],
|
662 |
textposition='auto',
|
|
|
675 |
xaxis_title='Space ID',
|
676 |
yaxis_title='Rank',
|
677 |
yaxis=dict(
|
678 |
+
autorange='reversed', # Y์ถ ๋ฐ์
|
679 |
+
tickmode='linear',
|
680 |
+
tick0=0,
|
681 |
+
dtick=20,
|
682 |
range=[0, 400]
|
683 |
),
|
684 |
height=800,
|
|
|
702 |
title = space.get('cardData', {}).get('title') or space.get('title', 'No Title')
|
703 |
likes = space.get('likes', 0)
|
704 |
|
|
|
705 |
html_content += f"""
|
706 |
<div style='
|
707 |
background: white;
|
|
|
738 |
</a>
|
739 |
</div>
|
740 |
"""
|
|
|
|
|
741 |
|
742 |
html_content += "</div></div>"
|
743 |
|