Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -40,8 +40,14 @@ BASE_LOCATION = [0, 23]
|
|
40 |
RULES = """<h1>OSV-5M (plonk)</h1>
|
41 |
<center><img width="256" alt="Rotating globe" src="https://upload.wikimedia.org/wikipedia/commons/6/6b/Rotating_globe.gif"></center>
|
42 |
<h2> Instructions </h2>
|
43 |
-
<h3> Click on the map 🗺️ (left) to the location at which you think the image 🖼️ (right) was captured
|
44 |
-
<h3> Click "Select" to finalize your selection and then "Next" to move to the next image
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
"""
|
46 |
css = """
|
47 |
@font-face {
|
@@ -274,6 +280,10 @@ class Engine(object):
|
|
274 |
def load_images_and_coordinates(self, csv_file):
|
275 |
# Load the CSV
|
276 |
df = pd.read_csv(csv_file)
|
|
|
|
|
|
|
|
|
277 |
|
278 |
# Get the image filenames and their coordinates
|
279 |
self.images = [os.path.join(self.image_folder, f"{img_path}.jpg") for img_path in df['id'].tolist()[:]]
|
|
|
40 |
RULES = """<h1>OSV-5M (plonk)</h1>
|
41 |
<center><img width="256" alt="Rotating globe" src="https://upload.wikimedia.org/wikipedia/commons/6/6b/Rotating_globe.gif"></center>
|
42 |
<h2> Instructions </h2>
|
43 |
+
<h3> Click on the map 🗺️ (left) to the location at which you think the image 🖼️ (right) was captured!</h3>
|
44 |
+
<h3> 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: Plonk-AI (our best model) and Baseline-AI (a simpler approach). These AIs have not been trained on any of the images you will see; in fact, they haven't seen anything within a 1km radius of them. Like you, the AIs will need to pick up on geographic clues to pinpoint the locations of the images.</h3>
|
48 |
+
|
49 |
+
<h2> Geoscore </h2>
|
50 |
+
<h3> The geoscore is calculated based on how close each guess is to the true location as in Geoguessr, with a maximum of 5000 points, using the formula := 5000*exp(-d/1492.7) </h3>
|
51 |
"""
|
52 |
css = """
|
53 |
@font-face {
|
|
|
280 |
def load_images_and_coordinates(self, csv_file):
|
281 |
# Load the CSV
|
282 |
df = pd.read_csv(csv_file)
|
283 |
+
# Put image with id 732681614433401 on the top and then all the rest below
|
284 |
+
df['id'] = df['id'].astype(str)
|
285 |
+
df = pd.concat([df[df['id'] == '495204901603170'], df[df['id'] != '495204901603170']])
|
286 |
+
df = pd.concat([df[df['id'] == '732681614433401'], df[df['id'] != '732681614433401']])
|
287 |
|
288 |
# Get the image filenames and their coordinates
|
289 |
self.images = [os.path.join(self.image_folder, f"{img_path}.jpg") for img_path in df['id'].tolist()[:]]
|