Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
"""Requires gradio==4.27.0"""
|
2 |
import io
|
3 |
-
import shutil
|
4 |
import os
|
5 |
import json
|
6 |
-
import uuid
|
7 |
import time
|
8 |
-
import math
|
9 |
import datetime
|
10 |
import numpy as np
|
11 |
|
@@ -40,16 +37,15 @@ BASE_LOCATION = [0, 23]
|
|
40 |
RULES = """<h1 style="margin-bottom: 0.5em">OSV-5M (plonk)</h1>
|
41 |
<center style="margin-bottom: 1em; margin-top: 1em"><img width="256" alt="Rotating globe" src="https://upload.wikimedia.org/wikipedia/commons/6/6b/Rotating_globe.gif"></center>
|
42 |
<h2 style="margin-top: 0.5em"> Instructions </h2>
|
43 |
-
<h3> Click on the map 🗺️ (left) to the location at which you think the image 🖼️ (right) was captured
|
44 |
-
<h3 style="margin-bottom: 0.5em"> Click "Select" to finalize your selection and then "Next" to move to the next image.</h3>
|
45 |
|
46 |
<h2> AI Competitors </h2>
|
47 |
-
<h3> You will compete against two AIs: <b>Plonk-AI</b> (our best model) and Baseline-AI (a simpler approach).</h3>
|
48 |
-
<h3> These AIs have not been trained on any of the images you will see; in fact, they haven't seen anything within a <b>1km radius</b> of them.</h3>
|
49 |
-
<h3 style="margin-bottom: 0.5em"> Like you, the AIs will need to pick up on geographic clues to pinpoint the locations of the images.</h3>
|
50 |
|
51 |
<h2> Geoscore </h2>
|
52 |
-
<h3> The geoscore is calculated based on how close each guess is to the true location as in Geoguessr, with a maximum of <b>5000 points
|
|
|
|
|
53 |
"""
|
54 |
css = """
|
55 |
@font-face {
|
@@ -575,4 +571,4 @@ if __name__ == "__main__":
|
|
575 |
next_button.click(next_, inputs=[state], outputs=[map_, results, image_, text_count, text, next_button, perf, coords, rules, text_end, select_button])
|
576 |
exit_button.click(exit_, inputs=[state], outputs=[map_, results, image_, text_count, text, next_button, perf, coords, rules, text_end, select_button])
|
577 |
|
578 |
-
demo.queue().launch(allowed_paths=["custom.ttf"], debug=True)
|
|
|
1 |
"""Requires gradio==4.27.0"""
|
2 |
import io
|
|
|
3 |
import os
|
4 |
import json
|
|
|
5 |
import time
|
|
|
6 |
import datetime
|
7 |
import numpy as np
|
8 |
|
|
|
37 |
RULES = """<h1 style="margin-bottom: 0.5em">OSV-5M (plonk)</h1>
|
38 |
<center style="margin-bottom: 1em; margin-top: 1em"><img width="256" alt="Rotating globe" src="https://upload.wikimedia.org/wikipedia/commons/6/6b/Rotating_globe.gif"></center>
|
39 |
<h2 style="margin-top: 0.5em"> Instructions </h2>
|
40 |
+
<h3 style="margin-bottom: 0.5em"> Click on the map 🗺️ (left) to the location at which you think the image 🖼️ (right) was captured!<br>Click "Select" to finalize your selection and then "Next" to move to the next image.</h3>
|
|
|
41 |
|
42 |
<h2> AI Competitors </h2>
|
43 |
+
<h3 style="margin-bottom: 0.5em"> You will compete against two AIs: <b>Plonk-AI</b> (our best model) and Baseline-AI (a simpler approach).<br> These AIs have not been trained on any of the images you will see; in fact, they haven't seen anything within a <b>1km radius</b> of them.<br> Like you, the AIs will need to pick up on geographic clues to pinpoint the locations of the images.</h3>
|
|
|
|
|
44 |
|
45 |
<h2> Geoscore </h2>
|
46 |
+
<h3> The geoscore is calculated based on how close each guess is to the true location as in Geoguessr, with a maximum of <b>5000 points:</b>
|
47 |
+
<center style="margin-bottom: 0em; margin-top: 1em"><img src="https://latex.codecogs.com/svg.image?g(d)=5000\exp\left(\\frac{-d}{1492.7}\\right)"></img></center>
|
48 |
+
|
49 |
"""
|
50 |
css = """
|
51 |
@font-face {
|
|
|
571 |
next_button.click(next_, inputs=[state], outputs=[map_, results, image_, text_count, text, next_button, perf, coords, rules, text_end, select_button])
|
572 |
exit_button.click(exit_, inputs=[state], outputs=[map_, results, image_, text_count, text, next_button, perf, coords, rules, text_end, select_button])
|
573 |
|
574 |
+
demo.queue().launch(allowed_paths=["custom.ttf", "geoscore.gif"], debug=True)
|