Anonymous commited on
Commit
a439024
Β·
1 Parent(s): a335976

fix: print top 5 metadata

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -403,7 +403,7 @@ def search_location(lat, lon, threshold):
403
 
404
  def generate_status_msg(count, threshold, results):
405
  status_msg = f"Found {count} matches in top {threshold*100:.0f}‰.\n\nTop {len(results)} similar images:\n"
406
- for i, res in enumerate(results[:3]):
407
  status_msg += f"{i+1}. Product ID: {res['id']}, Location: ({res['lat']:.4f}, {res['lon']:.4f}), Score: {res['score']:.4f}\n"
408
  return status_msg
409
 
@@ -623,7 +623,7 @@ with gr.Blocks(title="EarthEmbeddingExplorer") as demo:
623
  <div style="display: flex; gap: 0.2em; align-items: center; justify-content: center;">
624
  <a href="https://www.modelscope.cn/studios/VoyagerX/EarthExplorer"><img src="https://img.shields.io/badge/Open in ModelScope.cn-xGPU-624aff"></a>
625
  <a href="https://modelscope.cn/datasets/VoyagerX/EarthEmbeddings"><img src="https://img.shields.io/badge/πŸ‘Ύ MS-Dataset-624aff"></a>
626
- <a href="https://huggingface.co/spaces/ML4Sustain/EarthExplorer"><img src="https://img.shields.io/badge/Open in HF Space-CPU-FFD21E"></a>
627
  <a href="https://huggingface.co/datasets/ML4Sustain/EarthEmbeddings"><img src="https://img.shields.io/badge/πŸ€— HF-Dataset-FFD21E"></a>
628
  <a href="https://huggingface.co/spaces/ML4Sustain/EarthExplorer/blob/main/Tutorial.md"> <img src="https://img.shields.io/badge/Tutorial-πŸ“–-007bff"> </a>
629
  <a href="https://modelscope.cn/studios/VoyagerX/EarthExplorer/file/view/master/Tutorial_zh.md?status=1"> <img src="https://img.shields.io/badge/中文教程-πŸ“–-007bff"> </a>
 
403
 
404
  def generate_status_msg(count, threshold, results):
405
  status_msg = f"Found {count} matches in top {threshold*100:.0f}‰.\n\nTop {len(results)} similar images:\n"
406
+ for i, res in enumerate(results[:5]):
407
  status_msg += f"{i+1}. Product ID: {res['id']}, Location: ({res['lat']:.4f}, {res['lon']:.4f}), Score: {res['score']:.4f}\n"
408
  return status_msg
409
 
 
623
  <div style="display: flex; gap: 0.2em; align-items: center; justify-content: center;">
624
  <a href="https://www.modelscope.cn/studios/VoyagerX/EarthExplorer"><img src="https://img.shields.io/badge/Open in ModelScope.cn-xGPU-624aff"></a>
625
  <a href="https://modelscope.cn/datasets/VoyagerX/EarthEmbeddings"><img src="https://img.shields.io/badge/πŸ‘Ύ MS-Dataset-624aff"></a>
626
+ <a href="https://huggingface.co/spaces/VoyagerXHF/EarthEmbeddingExplorer/tree/main"><img src="https://img.shields.io/badge/Open in HF Space-CPU-FFD21E"></a>
627
  <a href="https://huggingface.co/datasets/ML4Sustain/EarthEmbeddings"><img src="https://img.shields.io/badge/πŸ€— HF-Dataset-FFD21E"></a>
628
  <a href="https://huggingface.co/spaces/ML4Sustain/EarthExplorer/blob/main/Tutorial.md"> <img src="https://img.shields.io/badge/Tutorial-πŸ“–-007bff"> </a>
629
  <a href="https://modelscope.cn/studios/VoyagerX/EarthExplorer/file/view/master/Tutorial_zh.md?status=1"> <img src="https://img.shields.io/badge/中文教程-πŸ“–-007bff"> </a>