Joffrey Thomas commited on
Commit
682a8fc
Β·
1 Parent(s): 7d93d9d

move instructions

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -301,8 +301,8 @@ def build_street_html(image_url: str) -> str:
301
  <div id="mini-map-wrap" style="transition:all 0.3s ease;position:absolute;right:10px;bottom:10px;border:2px solid #fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2);background:#fff;">
302
  <div id="mini-map" style="width:100%;height:100%;cursor:pointer"></div>
303
  <div id="map-controls" style="position:absolute;right:8px;top:8px;display:flex;gap:6px;z-index:5;">
304
- <button id="map-size-minus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#f97316;color:#fff;">βˆ’</button>
305
- <button id="map-size-plus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#f97316;color:#fff;">+</button>
306
  </div>
307
  </div>
308
  </div>
@@ -575,15 +575,13 @@ APP_BOOT_JS = """
575
  if (!btn) return;
576
  if (!btn.dataset.bound) {
577
  btn.addEventListener('click', () => {
578
- const ov = document.getElementById('popup-overlay');
579
- if (ov) ov.remove();
580
  const nxt = document.getElementById('next_btn');
581
  if (nxt) nxt.click();
582
  });
583
  btn.dataset.bound = '1';
584
  }
585
  });
586
- window.addEventListener('keydown', (ev) => { if (ev.key === 'Escape') { const ov = document.getElementById('popup-overlay'); if (ov) ov.remove(); const nxt = document.getElementById('next_btn'); if (nxt) nxt.click(); } }, { once: true });
587
  log('Popup map initialized');
588
  } catch (e) { log('Popup map init error', e); }
589
  });
@@ -635,15 +633,14 @@ APP_BOOT_JS = """
635
  with gr.Blocks(css=APP_CSS, title="LLM GeoGuessr") as demo:
636
  user_profile = gr.State()
637
 
638
- with gr.Row():
639
- gr.Markdown("## LLM GeoGuessr", elem_id="title_md")
640
- gr.Markdown("""
641
- ### How to Play
642
- 1. **Select a difficulty** and click "Start Game".
643
- 2. You'll be shown a random Street View image for 3 rounds.
644
- 3. Place a marker on the mini-map to guess the location.
645
- 4. Submit your guess and see how your score compares to the AI's!
646
- """)
647
 
648
  login_prompt_md = gr.Markdown("### Please log in with your Hugging Face account to play.", visible=True)
649
  login_button = LoginButton(visible=True)
 
301
  <div id="mini-map-wrap" style="transition:all 0.3s ease;position:absolute;right:10px;bottom:10px;border:2px solid #fff;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,0.2);background:#fff;">
302
  <div id="mini-map" style="width:100%;height:100%;cursor:pointer"></div>
303
  <div id="map-controls" style="position:absolute;right:8px;top:8px;display:flex;gap:6px;z-index:5;">
304
+ <button id="map-size-minus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#f97316;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;padding:0;line-height:0;">βˆ’</button>
305
+ <button id="map-size-plus" class="map-ctrl" style="width:34px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,0.2);background:#f97316;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;padding:0;line-height:0;">+</button>
306
  </div>
307
  </div>
308
  </div>
 
575
  if (!btn) return;
576
  if (!btn.dataset.bound) {
577
  btn.addEventListener('click', () => {
 
 
578
  const nxt = document.getElementById('next_btn');
579
  if (nxt) nxt.click();
580
  });
581
  btn.dataset.bound = '1';
582
  }
583
  });
584
+ window.addEventListener('keydown', (ev) => { if (ev.key === 'Escape') { const nxt = document.getElementById('next_btn'); if (nxt) nxt.click(); } }, { once: true });
585
  log('Popup map initialized');
586
  } catch (e) { log('Popup map init error', e); }
587
  });
 
633
  with gr.Blocks(css=APP_CSS, title="LLM GeoGuessr") as demo:
634
  user_profile = gr.State()
635
 
636
+ gr.Markdown("## LLM GeoGuessr", elem_id="title_md")
637
+ gr.Markdown("""
638
+ ### How to Play
639
+ 1. **Select a difficulty** and click "Start Game".
640
+ 2. You'll be shown a random Street View image for 3 rounds.
641
+ 3. Place a marker on the mini-map to guess the location.
642
+ 4. Submit your guess and see how your score compares to the AI's!
643
+ """)
 
644
 
645
  login_prompt_md = gr.Markdown("### Please log in with your Hugging Face account to play.", visible=True)
646
  login_button = LoginButton(visible=True)