Spaces:
Sleeping
Sleeping
Ludovic Moncla commited on
Commit ·
a7c9685
1
Parent(s): c21ce78
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,8 +100,27 @@ examples = [
|
|
| 100 |
]
|
| 101 |
|
| 102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
with gr.Blocks() as demo:
|
| 104 |
-
gr.Markdown(
|
| 105 |
|
| 106 |
with gr.Row():
|
| 107 |
with gr.Column():
|
|
@@ -127,12 +146,9 @@ with gr.Blocks() as demo:
|
|
| 127 |
run_btn.click(fn=extract_coordinates, inputs=inp, outputs=out_text)
|
| 128 |
|
| 129 |
out_text = gr.Textbox(label="Extract and normalize DMS coordinates (fine-tuned mT5)")
|
| 130 |
-
#out_map = gr.Map(label="Coordinates on Map")
|
| 131 |
map = gr.Plot(label="Coordinates on Map")
|
| 132 |
run_btn.click(fn=norm_coordinates, inputs=inp, outputs=[out_text, map])
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
# Launch
|
| 137 |
if __name__ == "__main__":
|
| 138 |
demo.launch()
|
|
|
|
| 100 |
]
|
| 101 |
|
| 102 |
|
| 103 |
+
description = """
|
| 104 |
+
# 🌍 Geographic Coordinate Extractor
|
| 105 |
+
---
|
| 106 |
+
This Space demonstrates the performance of AI models trained to automate the extraction of geographical coordinates from the 18th-century **Encyclopédie of Diderot and d'Alembert**.
|
| 107 |
+
|
| 108 |
+
### 🛠️ How it Works:
|
| 109 |
+
1. **Classification:** A BERT-like model identifies whether a given encyclopedia entry contains geographic coordinates.
|
| 110 |
+
2. **Extraction & Normalization:** An mT5-based model retrieves raw coordinate strings from the text and normalizes them into a standard DMS format.
|
| 111 |
+
|
| 112 |
+
You can test the models by entering a custom text or choosing from the examples provided.
|
| 113 |
+
|
| 114 |
+
- **Authors:** Ludovic Moncla, Pierre Nugues, Thierry Joliveau, and Katherine McDonough.
|
| 115 |
+
- **Project:** [GEODE](https://geode-project.github.io)
|
| 116 |
+
|
| 117 |
+
### Reference:
|
| 118 |
+
> Moncla, L., Nugues, P., Joliveau, T., & McDonough, K. (2026). **EDDA-Coordinata: An Annotated Dataset of Historical Geographic Coordinates**. *arXiv preprint [arXiv:2602.23941](https://arxiv.org/abs/2602.23941). (accepted at LREC 2026)*
|
| 119 |
+
---
|
| 120 |
+
"""
|
| 121 |
+
|
| 122 |
with gr.Blocks() as demo:
|
| 123 |
+
gr.Markdown(description)
|
| 124 |
|
| 125 |
with gr.Row():
|
| 126 |
with gr.Column():
|
|
|
|
| 146 |
run_btn.click(fn=extract_coordinates, inputs=inp, outputs=out_text)
|
| 147 |
|
| 148 |
out_text = gr.Textbox(label="Extract and normalize DMS coordinates (fine-tuned mT5)")
|
|
|
|
| 149 |
map = gr.Plot(label="Coordinates on Map")
|
| 150 |
run_btn.click(fn=norm_coordinates, inputs=inp, outputs=[out_text, map])
|
| 151 |
|
|
|
|
|
|
|
| 152 |
# Launch
|
| 153 |
if __name__ == "__main__":
|
| 154 |
demo.launch()
|