Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -655,11 +655,10 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
655 |
likes = [space.get('likes', 0) for space in spaces]
|
656 |
titles = [space.get('cardData', {}).get('title') or space.get('title', 'No Title') for space in spaces]
|
657 |
|
658 |
-
# ๋ง๋ ๊ทธ๋ํ ์์ฑ
|
659 |
fig.add_trace(go.Bar(
|
660 |
x=ids,
|
661 |
-
y=ranks,
|
662 |
-
base=400, # ๋ง๋์ ๊ธฐ์ค์ ์ 400์ผ๋ก ์ค์
|
663 |
text=[f"Rank: {r}<br>Title: {t}<br>Likes: {l}"
|
664 |
for r, t, l in zip(ranks, titles, likes)],
|
665 |
textposition='auto',
|
@@ -679,10 +678,10 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
|
|
679 |
yaxis_title='Rank',
|
680 |
yaxis=dict(
|
681 |
autorange='reversed', # Y์ถ์ ๋ฐ์
|
682 |
-
tickmode='
|
683 |
-
|
684 |
-
|
685 |
-
range=[
|
686 |
),
|
687 |
height=800,
|
688 |
showlegend=False,
|
|
|
655 |
likes = [space.get('likes', 0) for space in spaces]
|
656 |
titles = [space.get('cardData', {}).get('title') or space.get('title', 'No Title') for space in spaces]
|
657 |
|
658 |
+
# ๋ง๋ ๊ทธ๋ํ ์์ฑ
|
659 |
fig.add_trace(go.Bar(
|
660 |
x=ids,
|
661 |
+
y=ranks,
|
|
|
662 |
text=[f"Rank: {r}<br>Title: {t}<br>Likes: {l}"
|
663 |
for r, t, l in zip(ranks, titles, likes)],
|
664 |
textposition='auto',
|
|
|
678 |
yaxis_title='Rank',
|
679 |
yaxis=dict(
|
680 |
autorange='reversed', # Y์ถ์ ๋ฐ์
|
681 |
+
tickmode='array',
|
682 |
+
ticktext=[str(i) for i in range(1, 401, 20)], # 1๋ถํฐ 400๊น์ง 20 ๊ฐ๊ฒฉ์ผ๋ก ํ์
|
683 |
+
tickvals=[i for i in range(1, 401, 20)],
|
684 |
+
range=[1, 400] # Y์ถ ๋ฒ์๋ฅผ 1๋ถํฐ 400๊น์ง๋ก ์ค์
|
685 |
),
|
686 |
height=800,
|
687 |
showlegend=False,
|