oberbics commited on
Commit
e04f6f3
Β·
verified Β·
1 Parent(s): 89fd056

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +68 -20
app.py CHANGED
@@ -678,31 +678,79 @@ Die Katastrophe in <span style="background-color: #a8e6cf; font-weight: bold; pa
678
  inputs=[template, text],
679
  outputs=[status, output]
680
  )
681
-
682
 
683
-
684
- # Add your dateline examples here:
685
- gr.HTML("""
686
- <div style="margin-top: 30px; border-top: 1px solid #eaeaea; padding-top: 20px;">
687
- <h3 style="color: #4e8fd1; margin-bottom: 15px;">Dateline Examples in International News</h3>
688
- <p style="margin-bottom: 15px;">Here are some examples of how datelines work in international news reporting:</p>
689
-
690
- <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
691
- <div style="font-weight: bold; margin-bottom: 8px;">BERLIN β€” </div>
692
- <div style="color: #444; line-height: 1.5;">
693
- Japanese authorities confirmed at least 12 people died after a magnitude 6.8 earthquake struck the northern island of Hokkaido early Tuesday morning. Rescue operations continue in affected areas, with dozens still reported missing.
 
 
 
 
 
694
  </div>
695
- <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
696
- Example of a Paris newspaper using its Berlin correspondent to report on a Japan earthquake, with a simple location-only dateline.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
697
  </div>
698
  </div>
699
-
700
- <!-- Add other examples here -->
701
-
702
- </div>
703
- """)
704
 
705
- # This goes before:
706
  with gr.TabItem("πŸ“ Visualisierung von strukturierten Daten"):
707
 
708
  # This goes before:
 
678
  inputs=[template, text],
679
  outputs=[status, output]
680
  )
 
681
 
682
+ # Add dateline examples section below the extraction
683
+ # Note: This HTML block must be properly indented to be within the first tab
684
+ with gr.Row():
685
+ gr.HTML("""
686
+ <div style="margin-top: 30px; border-top: 1px solid #eaeaea; padding-top: 20px;">
687
+ <h3 style="color: #4e8fd1; margin-bottom: 15px;">Dateline Examples in International News</h3>
688
+ <p style="margin-bottom: 15px;">Here are some examples of how datelines work in international news reporting:</p>
689
+
690
+ <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
691
+ <div style="font-weight: bold; margin-bottom: 8px;">BERLIN β€” </div>
692
+ <div style="color: #444; line-height: 1.5;">
693
+ Japanese authorities confirmed at least 12 people died after a magnitude 6.8 earthquake struck the northern island of Hokkaido early Tuesday morning. Rescue operations continue in affected areas, with dozens still reported missing.
694
+ </div>
695
+ <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
696
+ Example of a Paris newspaper using its Berlin correspondent to report on a Japan earthquake, with a simple location-only dateline.
697
+ </div>
698
  </div>
699
+
700
+ <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
701
+ <div style="font-weight: bold; margin-bottom: 8px;">BERLIN, May 7, 2025 β€” </div>
702
+ <div style="color: #444; line-height: 1.5;">
703
+ Japan's Meteorological Agency has issued a tsunami warning for coastal regions following a strong offshore earthquake. Initial reports indicate waves of up to two meters could reach shorelines within hours.
704
+ </div>
705
+ <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
706
+ Example with both location and date in the dateline, showing more complete dateline format.
707
+ </div>
708
+ </div>
709
+
710
+ <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
711
+ <div style="font-weight: bold; margin-bottom: 8px;">BERLIN (AFP) β€” </div>
712
+ <div style="color: #444; line-height: 1.5;">
713
+ Economic impacts from last week's devastating earthquake in Japan have begun affecting global markets, with automotive supply chains particularly disrupted as several key parts manufacturers remain offline.
714
+ </div>
715
+ <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
716
+ Example showing a dateline that includes the news agency source (AFP) along with the reporting location.
717
+ </div>
718
+ </div>
719
+
720
+ <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
721
+ <div style="font-weight: bold; margin-bottom: 8px;">BERLIN/TOKYO β€” </div>
722
+ <div style="color: #444; line-height: 1.5;">
723
+ German Chancellor [Name] pledged humanitarian assistance today as Japanese officials announced the death toll from yesterday's earthquake has risen to 37. "Germany stands ready to provide whatever aid our Japanese friends request," the Chancellor stated at a Berlin press conference.
724
+ </div>
725
+ <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
726
+ Example of a dual location dateline, indicating reporting from both Berlin and Tokyo.
727
+ </div>
728
+ </div>
729
+
730
+ <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
731
+ <div style="font-weight: bold; margin-bottom: 8px;">BERLIN (Le Monde) β€” </div>
732
+ <div style="color: #444; line-height: 1.5;">
733
+ The powerful 7.2-magnitude earthquake that struck Japan's coastal regions yesterday has prompted international response, with the European Union mobilizing its emergency resources. Tokyo officials report widespread damage to infrastructure and at least 25 casualties.
734
+ </div>
735
+ <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
736
+ Example of a French newspaper (Le Monde) with its Berlin correspondent reporting on the Japan earthquake.
737
+ </div>
738
+ </div>
739
+
740
+ <div style="margin-bottom: 20px; padding: 15px; background-color: white; border-left: 4px solid #0066cc; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
741
+ <div style="font-weight: bold; margin-bottom: 8px;">BERLIN, For Le Figaro β€” </div>
742
+ <div style="color: #444; line-height: 1.5;">
743
+ Japanese Prime Minister [Name] declared a state of emergency following Tuesday's earthquake. German seismologists at the Potsdam Institute note this is the strongest seismic event in the region since 2011.
744
+ </div>
745
+ <div style="margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em; border-top: 1px dotted #ddd; padding-top: 8px;">
746
+ Example showing alternative format with newspaper name (Le Figaro) incorporated in the dateline.
747
+ </div>
748
  </div>
749
  </div>
750
+ """)
751
+
752
+
 
 
753
 
 
754
  with gr.TabItem("πŸ“ Visualisierung von strukturierten Daten"):
755
 
756
  # This goes before: