Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -353,27 +353,22 @@ with gr.Blocks(css=custom_css, title="Daten Strukturieren und Analysieren") as d
|
|
353 |
<p style="font-size: 1.3rem; margin-bottom: 1.8rem; color: #2c3e50; font-weight: 400; padding: 0 1rem;">
|
354 |
In dieser Unterrichtseinheit befassen wir uns mit der Strukturierung unstrukturierter historischer Texte und der Visualisierung von extrahierten Daten auf Karten. Die systematische Strukturierung von Daten wird mit einem für Informationsextrahierung trainiertem Sprachmodell durchgeführt, das auf der Question-Answering-Methode basiert. Diese Methode erlaubt es, Informationen mit Hilfe einer Frage zu extrahieren, wie etwa „Wo fand das Erdbeben statt"? Dies ermöglicht die Extrahierung des Ortes, an dem ein Erdbeben stattfand, auch wenn im Text selbst noch andere genannt werden.
|
355 |
</p>
|
356 |
-
I'll visualize the text with earthquake locations in green and other locations in orange:
|
357 |
|
358 |
<div style="font-family: 'Source Sans Pro', sans-serif; line-height: 1.7; font-size: 1.15rem; background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;">
|
359 |
-
Nene Erdbeben in <span style="background-color: #a8e6cf; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Earthquake Location">Japan</span>. <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">London</span>, 15. Jan. (Drahtber.) Reuter meldet aus <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Osaka</span>: Die telephonische Verbindung zwischen <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Osaka</span> und <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span> ist heute um 5.45 Uhr durch ein Erdbeben unterbrochen worden. Die Straßenbahnen in <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span> liegen still. Der Eisenbahnverkehr <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span> — <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Osaka</span> ist unterbrochen. Die kaiserliche Familie ist in Sicherheit. In <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Suvamo</span>, einer Borstadt <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokios</span>, sind Brände ausgebrochen. Ein Eisenbahnzug stürzte in den <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Bajubawo</span>, einem Fluß zwischen <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Gotemba</span> und <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span>. Sechs Züge wurden umgeworfen.
|
360 |
</div>
|
361 |
|
362 |
<div style="display: flex; margin-top: 20px;">
|
363 |
<div style="display: flex; align-items: center; margin-right: 20px;">
|
364 |
<div style="width: 20px; height: 20px; background-color: #a8e6cf; margin-right: 10px; border-radius: 3px;"></div>
|
365 |
-
<span>
|
366 |
</div>
|
367 |
<div style="display: flex; align-items: center;">
|
368 |
<div style="width: 20px; height: 20px; background-color: #ffdfba; margin-right: 10px; border-radius: 3px;"></div>
|
369 |
-
<span>
|
370 |
</div>
|
371 |
</div>
|
372 |
|
373 |
-
<div style="margin-top: 20px; font-style: italic;">
|
374 |
-
Note: This visualization shows how the model would differentiate between locations where earthquakes occurred (in green) versus locations that are mentioned but were not earthquake sites (in orange). The model determines this based on contextual clues in the text.
|
375 |
-
</div>
|
376 |
-
|
377 |
<div style="background: #f8f9fa; padding: 2rem; border-radius: 10px; margin-bottom: 2.5rem; border-left: 5px solid #3498db;">
|
378 |
<h3 style="margin-top: 0; color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 0.8rem; font-size: 1.5rem;">
|
379 |
Methodik: Vom unstrukturierten Text zur strukturierten Information
|
|
|
353 |
<p style="font-size: 1.3rem; margin-bottom: 1.8rem; color: #2c3e50; font-weight: 400; padding: 0 1rem;">
|
354 |
In dieser Unterrichtseinheit befassen wir uns mit der Strukturierung unstrukturierter historischer Texte und der Visualisierung von extrahierten Daten auf Karten. Die systematische Strukturierung von Daten wird mit einem für Informationsextrahierung trainiertem Sprachmodell durchgeführt, das auf der Question-Answering-Methode basiert. Diese Methode erlaubt es, Informationen mit Hilfe einer Frage zu extrahieren, wie etwa „Wo fand das Erdbeben statt"? Dies ermöglicht die Extrahierung des Ortes, an dem ein Erdbeben stattfand, auch wenn im Text selbst noch andere genannt werden.
|
355 |
</p>
|
|
|
356 |
|
357 |
<div style="font-family: 'Source Sans Pro', sans-serif; line-height: 1.7; font-size: 1.15rem; background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;">
|
358 |
+
Nene Erdbeben in <span style="background-color: #a8e6cf; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Earthquake Location">Japan</span>. <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">London</span>, 15. Jan. (Drahtber.) Reuter meldet aus <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Osaka</span>: Die telephonische Verbindung zwischen <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Osaka</span> und <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span> ist heute um 5.45 Uhr durch ein Erdbeben unterbrochen worden. Die Straßenbahnen in <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span> liegen still. Der Eisenbahnverkehr <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span> — <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Osaka</span> ist unterbrochen. Die kaiserliche Familie ist in Sicherheit. In <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Suvamo</span>, einer Borstadt <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokios</span>, sind Brände ausgebrochen. Ein Eisenbahnzug stürzte in den <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Bajubawo</span>, einem Fluß zwischen <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Gotemba</span> und <span style="background-color: #ffdfba; font-weight: bold; padding: 2px 5px; border-radius: 3px;" title="Non-Earthquake Location">Tokio</span>. Sechs Züge wurden umgeworfen.
|
359 |
</div>
|
360 |
|
361 |
<div style="display: flex; margin-top: 20px;">
|
362 |
<div style="display: flex; align-items: center; margin-right: 20px;">
|
363 |
<div style="width: 20px; height: 20px; background-color: #a8e6cf; margin-right: 10px; border-radius: 3px;"></div>
|
364 |
+
<span>Ort des Erdbebens: Japan</span>
|
365 |
</div>
|
366 |
<div style="display: flex; align-items: center;">
|
367 |
<div style="width: 20px; height: 20px; background-color: #ffdfba; margin-right: 10px; border-radius: 3px;"></div>
|
368 |
+
<span>Andere Orte: London, Osaka, Tokio, Suvamo, Gotemba.</span>
|
369 |
</div>
|
370 |
</div>
|
371 |
|
|
|
|
|
|
|
|
|
372 |
<div style="background: #f8f9fa; padding: 2rem; border-radius: 10px; margin-bottom: 2.5rem; border-left: 5px solid #3498db;">
|
373 |
<h3 style="margin-top: 0; color: #2c3e50; border-bottom: 2px solid #eee; padding-bottom: 0.8rem; font-size: 1.5rem;">
|
374 |
Methodik: Vom unstrukturierten Text zur strukturierten Information
|