nktssk commited on
Commit
d96e864
·
verified ·
1 Parent(s): 035480a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +311 -35
app.py CHANGED
@@ -27,44 +27,320 @@ from transformers import CLIPProcessor, CLIPModel
27
  ########################################
28
 
29
  landmark_titles = [
30
- "Eiffel Tower", "Taj Mahal", "Statue of Liberty", "Big Ben", "Golden Gate Bridge",
31
- "Moscow International Business Center", "Colosseum", "Leaning Tower of Pisa",
32
- "Great Wall of China", "Mount Rushmore", "Sydney Opera House", "Burj Khalifa",
33
- "Hagia Sophia", "Tower of London", "Notre Dame Cathedral", "Angkor Wat",
34
- "Petra", "Chichen Itza", "Machu Picchu", "Christ the Redeemer",
35
- "Acropolis of Athens", "Pyramids of Giza", "Brandenburg Gate", "Sagrada Familia",
36
- "Versailles Palace", "Santorini", "Niagara Falls", "Banff National Park",
37
- "Yellowstone National Park", "Grand Canyon", "Victoria Falls", "Mount Everest",
38
- "Blue Mosque", "Alhambra", "Forbidden City", "Buckingham Palace",
39
- "Prague Castle", "St. Peter's Basilica", "Matterhorn", "Lake Bled",
40
- "Stonehenge", "Uluru", "The Louvre", "Hollywood Sign", "Table Mountain",
41
- "Pompeii", "Edinburgh Castle", "Cappadocia", "Florence Cathedral",
42
- "Disneyland Paris", "Tokyo Tower", "Mount Fuji", "The Shard",
43
- "Shwedagon Pagoda", "St. Basil's Cathedral", "Champs-Élysées",
44
- "Red Square", "Kremlin", "Canals of Venice", "Rialto Bridge",
45
- "Mont Saint-Michel", "Neuschwanstein Castle", "Schönbrunn Palace",
46
- "Dubrovnik Old Town", "Lake Baikal", "Himeji Castle", "Berlin Wall",
47
- "Mecca", "Medina", "Galápagos Islands", "Easter Island",
48
- "Antelope Canyon", "Plitvice Lakes", "Cinque Terre", "Maldives",
49
- "Vatican Museums", "Iguazu Falls", "Ha Long Bay", "Jiuzhaigou Valley",
50
- "Mount Kilimanjaro", "Amazon Rainforest", "Santuario de las Lajas",
51
- "Giant's Causeway", "Monument Valley", "Moai Statues",
52
- "Torres del Paine", "Blue Lagoon", "Kruger National Park",
53
- "White Cliffs of Dover", "Notre-Dame Basilica", "Hohenzollern Castle",
54
- "Mont Blanc", "Seine River", "Amalfi Coast", "Lake Geneva",
55
- "Jungfrau Region", "Marina Bay Sands", "Gardens by the Bay",
56
- "Merlion Park", "Petronas Twin Towers", "Cebu Chocolate Hills",
57
- "Borobudur Temple", "Kiyomizu-dera", "Nara Park", "Fushimi Inari Shrine",
58
- "Sequoia National Park", "Yosemite National Park", "Haleakalā National Park",
59
- "Pike Place Market", "Old Faithful", "Badlands National Park",
60
- "Hoover Dam", "Bryce Canyon", "Rocky Mountain National Park",
61
- "Arches National Park", "Great Barrier Reef", "Whitehaven Beach",
62
- "Fraser Island", "Uluru-Kata Tjuta National Park", "Kangaroo Island",
63
- "Sydney Harbour Bridge", "Whitsunday Islands"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  ]
65
 
 
66
  def clean_text(text):
67
- # Очистка от некоторых спецсимволов, ссылок, диакритики
68
  text = re.sub(r'МФА:?\s?\[.*?\]', '', text)
69
  text = re.sub(r'\[.*?\]', '', text)
70
 
 
27
  ########################################
28
 
29
  landmark_titles = [
30
+ "Eiffel Tower",
31
+ "Louvre Museum",
32
+ "Cathédrale Notre-Dame de Paris",
33
+ "Arc de Triomphe",
34
+ "Palace of Versailles",
35
+
36
+ "Big Ben",
37
+ "London Eye",
38
+ "Tower of London",
39
+ "Buckingham Palace",
40
+ "Stonehenge",
41
+
42
+ "Colosseum",
43
+ "Pantheon",
44
+ "Trevi Fountain",
45
+ "Leaning Tower of Pisa",
46
+ "Doge's Palace",
47
+
48
+ "Sagrada Família",
49
+ "Alhambra",
50
+ "Park Güell",
51
+ "Cathedral of Santiago de Compostela",
52
+ "La Rambla",
53
+
54
+ "Neuschwanstein Castle",
55
+ "Brandenburg Gate",
56
+ "Reichstag Building",
57
+ "Cologne Cathedral",
58
+ "Hofbräuhaus München",
59
+
60
+ "Acropolis of Athens",
61
+ "Parthenon",
62
+ "Temple of Olympian Zeus",
63
+ "Delphi Ruins",
64
+ "Meteora Monasteries",
65
+
66
+ "Charles Bridge",
67
+ "Prague Castle",
68
+ "Old Town Square in Prague",
69
+ "St. Vitus Cathedral",
70
+ "Cesky Krumlov Castle",
71
+
72
+ "Schönbrunn Palace",
73
+ "Hofburg Palace",
74
+ "St. Stephen's Cathedral in Vienna",
75
+ "Belvedere Palace",
76
+ "Mozarthaus Vienna",
77
+
78
+ "Rijksmuseum",
79
+ "Van Gogh Museum",
80
+ "Anne Frank House",
81
+ "Kinderdijk Windmills",
82
+ "Keukenhof Gardens",
83
+
84
+ "Bruges' Historic Centre",
85
+ "Grand Place in Brussels",
86
+ "Atomium",
87
+ "Ghent Belfry",
88
+ "Basilica of the Holy Blood",
89
+
90
+ "Great Wall of China",
91
+ "Forbidden City",
92
+ "Terracotta Army",
93
+ "Potala Palace",
94
+ "Temple of Heaven",
95
+
96
+ "Taj Mahal",
97
+ "Red Fort",
98
+ "Gateway of India",
99
+ "Hawa Mahal",
100
+ "Golden Temple",
101
+
102
+ "Tokyo Tower",
103
+ "Fushimi Inari-taisha",
104
+ "Kiyomizu-dera",
105
+ "Himeji Castle",
106
+ "Itsukushima Shrine",
107
+
108
+ "Petronas Twin Towers",
109
+ "Batu Caves",
110
+ "Langkawi Sky Bridge",
111
+ "Kek Lok Si Temple",
112
+ "Mount Kinabalu",
113
+
114
+ "Gardens by the Bay",
115
+ "Marina Bay Sands",
116
+ "Merlion Park",
117
+ "Buddha Tooth Relic Temple",
118
+ "Chinatown Singapore",
119
+
120
+ "Angkor Wat",
121
+ "Ta Prohm",
122
+ "Bayon Temple",
123
+ "Preah Khan",
124
+ "Banteay Srei",
125
+
126
+ "Borobudur Temple",
127
+ "Prambanan Temple",
128
+ "Tanah Lot",
129
+ "Uluwatu Temple",
130
+ "Mount Bromo",
131
+
132
+ "Ha Long Bay",
133
+ "Imperial City of Huế",
134
+ "My Son Sanctuary",
135
+ "Hoi An Ancient Town",
136
+ "Phong Nha-Ke Bang National Park",
137
+
138
+ "Gyeongbokgung Palace",
139
+ "Bukchon Hanok Village",
140
+ "N Seoul Tower",
141
+ "Jeju Island",
142
+ "Changdeokgung Palace",
143
+
144
+ "Shwedagon Pagoda",
145
+ "Bagan Temples",
146
+ "Inle Lake",
147
+ "Kyaiktiyo Pagoda",
148
+ "Mandalay Palace",
149
+
150
+ "Pyramids of Giza",
151
+ "Great Sphinx of Giza",
152
+ "Karnak Temple",
153
+ "Valley of the Kings",
154
+ "Abu Simbel Temples",
155
+
156
+ "Victoria Falls",
157
+ "Hwange National Park",
158
+ "Matobo Hills",
159
+ "Great Zimbabwe Ruins",
160
+ "Lake Kariba",
161
+
162
+ "Serengeti National Park",
163
+ "Mount Kilimanjaro",
164
+ "Ngorongoro Crater",
165
+ "Zanzibar Stone Town",
166
+ "Lake Manyara",
167
+
168
+ "Table Mountain",
169
+ "Robben Island",
170
+ "Kruger National Park",
171
+ "Cape of Good Hope",
172
+ "Blyde River Canyon",
173
+
174
+ "Djmaa el Fna",
175
+ "Koutoubia Mosque",
176
+ "Hassan II Mosque",
177
+ "Chefchaouen",
178
+ "Aït Benhaddou",
179
+
180
+ "Gorée Island",
181
+ "Lake Retba (Lac Rose)",
182
+ "Saloum Delta",
183
+ "Saint-Louis Island",
184
+ "Niokolo-Koba National Park",
185
+
186
+ "Sossusvlei",
187
+ "Etosha National Park",
188
+ "Fish River Canyon",
189
+ "Skeleton Coast",
190
+ "Twyfelfontein",
191
+
192
+ "Lalibela Churches",
193
+ "Simien Mountains",
194
+ "Blue Nile Falls",
195
+ "Aksum Obelisks",
196
+ "Harar Jugol",
197
+
198
+ "Carthage Archaeological Site",
199
+ "El Jem Amphitheatre",
200
+ "Medina of Tunis",
201
+ "Sidi Bou Said",
202
+ "Dougga",
203
+
204
+ "Mount Kenya",
205
+ "Maasai Mara National Reserve",
206
+ "Lake Nakuru",
207
+ "Amboseli National Park",
208
+ "Tsavo National Park",
209
+
210
+ "Statue of Liberty",
211
+ "Grand Canyon",
212
+ "Yellowstone National Park",
213
+ "Mount Rushmore",
214
+ "Golden Gate Bridge",
215
+
216
+ "Niagara Falls",
217
+ "CN Tower",
218
+ "Banff National Park",
219
+ "Notre-Dame Basilica in Montreal",
220
+ "Stanley Park",
221
+
222
+ "Chichén Itzá",
223
+ "Teotihuacan",
224
+ "Tulum Ruins",
225
+ "Copper Canyon",
226
+ "Palenque",
227
+
228
+ "Havana Old Town",
229
+ "Varadero Beach",
230
+ "Trinidad Historic Center",
231
+ "Viñales Valley",
232
+ "Castillo de San Pedro de la Roca",
233
+
234
+ "Altos de Chavón",
235
+ "Santo Domingo Colonial Zone",
236
+ "Punta Cana Beaches",
237
+ "Los Haitises National Park",
238
+ "Bahía de las Águilas",
239
+
240
+ "Blue Mountains",
241
+ "Dunn's River Falls",
242
+ "Bob Marley Museum",
243
+ "Negril Seven Mile Beach",
244
+ "Port Royal",
245
+
246
+ "Belize Barrier Reef",
247
+ "Caracol",
248
+ "Lamanai",
249
+ "Xunantunich",
250
+ "Caye Caulker",
251
+
252
+ "Tikal",
253
+ "Antigua Guatemala",
254
+ "Lake Atitlán",
255
+ "Semuc Champey",
256
+ "Pacaya Volcano",
257
+
258
+ "Panama Canal",
259
+ "Casco Viejo",
260
+ "San Blas Islands",
261
+ "Bocas del Toro",
262
+ "Coiba National Park",
263
+
264
+ "Arenal Volcano",
265
+ "Manuel Antonio National Park",
266
+ "Monteverde Cloud Forest",
267
+ "Tortuguero National Park",
268
+ "Corcovado National Park",
269
+
270
+ "Machu Picchu",
271
+ "Nazca Lines",
272
+ "Lake Titicaca",
273
+ "Colca Canyon",
274
+ "Cusco Historic Center",
275
+
276
+ "Red Square",
277
+ "Saint Basil's Cathedral",
278
+ "Kremlin (Moscow)",
279
+ "Hermitage Museum",
280
+ "Peterhof",
281
+ "Catherine Palace",
282
+ "Lake Baikal",
283
+ "Valley of Geysers (Kamchatka)",
284
+ "Kazan Kremlin",
285
+ "Kizhi Pogost",
286
+
287
+ "Christ the Redeemer",
288
+ "Sugarloaf Mountain",
289
+ "Iguazu Falls",
290
+ "Amazon Rainforest",
291
+ "Copacabana Beach",
292
+
293
+ "Easter Island (Rapa Nui)",
294
+ "Torres del Paine",
295
+ "Valle de la Luna",
296
+ "Atacama Desert",
297
+ "San Cristobal Hill",
298
+
299
+ "Perito Moreno Glacier",
300
+ "Mount Fitz Roy",
301
+ "Buenos Aires Obelisk",
302
+ "La Boca Neighborhood",
303
+ "Talampaya National Park",
304
+
305
+ "Salt Cathedral of Zipaquirá",
306
+ "Cartagena Old Town",
307
+ "Tayrona National Park",
308
+ "Cocora Valley",
309
+ "Monserrate",
310
+
311
+ "Galápagos Islands",
312
+ "Cotopaxi Volcano",
313
+ "Quilotoa Lake",
314
+ "Middle of the World City",
315
+ "Historic Center of Quito",
316
+
317
+ "Los Roques Archipelago",
318
+ "Angel Falls",
319
+ "Margarita Island",
320
+ "Canaima National Park",
321
+ "Roraima",
322
+
323
+ "Salar de Uyuni",
324
+ "Laguna Colorada",
325
+ "Tiwanaku",
326
+ "La Paz Cable Car",
327
+ "Death Road (Yungas Road)",
328
+
329
+ "Casapueblo",
330
+ "Punta del Este",
331
+ "Colonia del Sacramento",
332
+ "Plaza Independencia in Montevideo",
333
+ "Teatro Solís",
334
+
335
+ "Itaipu Dam",
336
+ "Asunción Historic Centre",
337
+ "Jesuit Missions of La Santísima Trinidad",
338
+ "Ybycuí National Park",
339
+ "Cerro Tobatí"
340
  ]
341
 
342
+
343
  def clean_text(text):
 
344
  text = re.sub(r'МФА:?\s?\[.*?\]', '', text)
345
  text = re.sub(r'\[.*?\]', '', text)
346