openfree commited on
Commit
fa7bb84
·
verified ·
1 Parent(s): ed06e59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -292,6 +292,8 @@ target_models = {
292
  "sel303/llama3-diverce-ver1.6": "https://huggingface.co/sel303/llama3-diverce-ver1.6"
293
  }
294
 
 
 
295
  def get_models_data(progress=gr.Progress()):
296
  """모델 데이터 가져오기"""
297
  def normalize_model_id(model_id):
@@ -639,7 +641,8 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
639
  rank = space['rank']
640
  title = space.get('cardData', {}).get('title') or space.get('title', 'No Title')
641
  likes = space.get('likes', 0)
642
-
 
643
  html_content += f"""
644
  <div style='
645
  background: white;
@@ -649,7 +652,17 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
649
  transition: transform 0.2s;
650
  '>
651
  <h3 style='color: #34495e;'>Rank #{rank} - {space_id}</h3>
652
- <h4 style='color: #2c3e50; margin: 10px 0; font-size: 1.1em;'>{title}</h4>
 
 
 
 
 
 
 
 
 
 
653
  <p style='color: #7f8c8d; margin-bottom: 10px;'>👍 Likes: {likes}</p>
654
  <a href='{target_spaces[space_id]}'
655
  target='_blank'
@@ -666,6 +679,8 @@ def get_spaces_data(sort_type="trending", progress=gr.Progress()):
666
  </a>
667
  </div>
668
  """
 
 
669
 
670
  html_content += "</div></div>"
671
 
 
292
  "sel303/llama3-diverce-ver1.6": "https://huggingface.co/sel303/llama3-diverce-ver1.6"
293
  }
294
 
295
+
296
+
297
  def get_models_data(progress=gr.Progress()):
298
  """모델 데이터 가져오기"""
299
  def normalize_model_id(model_id):
 
641
  rank = space['rank']
642
  title = space.get('cardData', {}).get('title') or space.get('title', 'No Title')
643
  likes = space.get('likes', 0)
644
+
645
+ # 스페이스 함수의 HTML 카드 생성 부분 수정
646
  html_content += f"""
647
  <div style='
648
  background: white;
 
652
  transition: transform 0.2s;
653
  '>
654
  <h3 style='color: #34495e;'>Rank #{rank} - {space_id}</h3>
655
+ <h4 style='
656
+ color: #2980b9;
657
+ margin: 10px 0;
658
+ font-size: 1.2em;
659
+ font-weight: bold;
660
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
661
+ background: linear-gradient(to right, #3498db, #2980b9);
662
+ -webkit-background-clip: text;
663
+ -webkit-text-fill-color: transparent;
664
+ padding: 5px 0;
665
+ '>{title}</h4>
666
  <p style='color: #7f8c8d; margin-bottom: 10px;'>👍 Likes: {likes}</p>
667
  <a href='{target_spaces[space_id]}'
668
  target='_blank'
 
679
  </a>
680
  </div>
681
  """
682
+
683
+
684
 
685
  html_content += "</div></div>"
686