zekun-li commited on
Commit
6a71af7
Β·
verified Β·
1 Parent(s): 58dd7a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -30,7 +30,7 @@ def get_toponym_entities(text):
30
  if label_id != 0 and idx < len(offset_mapping):
31
  start, end = offset_mapping[idx].tolist()
32
  if end > start:
33
- entities.append({"start": start, "end": end, "entity": "Toponym"})
34
 
35
  return {"text": text, "entities": entities}
36
 
@@ -43,8 +43,8 @@ demo = gr.Interface(
43
  title="🌍 Toponym Recognition with GeoLM",
44
  description="Enter a paragraph and detect highlighted place names using the zekun-li/geolm-base-toponym-recognition model.",
45
  examples=[
46
- ["Minneapolis, officially the City of Minneapolis, is a city in Minnesota."],
47
- ["Los Angeles is the most populous city in California."],
48
  ],
49
  )
50
 
 
30
  if label_id != 0 and idx < len(offset_mapping):
31
  start, end = offset_mapping[idx].tolist()
32
  if end > start:
33
+ entities.append({"start": start, "end": end, "entity": "Topo"})
34
 
35
  return {"text": text, "entities": entities}
36
 
 
43
  title="🌍 Toponym Recognition with GeoLM",
44
  description="Enter a paragraph and detect highlighted place names using the zekun-li/geolm-base-toponym-recognition model.",
45
  examples=[
46
+ ["Minneapolis, officially the City of Minneapolis, is a city in the state of Minnesota and the county seat of Hennepin County. As of the 2020 census the population was 429,954, making it the largest city in Minnesota and the 46th-most-populous in the United States. Nicknamed the "City of Lakes", Minneapolis is abundant in water, with thirteen lakes, wetlands, the Mississippi River, creeks, and waterfalls."],
47
+ ["Los Angeles, often referred to by its initials L.A., is the most populous city in California, the most populous U.S. state. It is the commercial, financial, and cultural center of Southern California. Los Angeles is the second-most populous city in the United States after New York City, with a population of roughly 3.9 million residents within the city limits as of 2020."],
48
  ],
49
  )
50