ajsbsd commited on
Commit
2177906
Β·
verified Β·
1 Parent(s): 43bf4fe

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +94 -0
app.py ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # === Sample Data (Replace with real data or API calls if needed) ===
4
+ news_mentions = [
5
+ {
6
+ "source": "One America News Network",
7
+ "title": "Victor Davis Hanson on the 2024 Election Landscape",
8
+ "link": "https://example.com/vdh-oann-election "
9
+ },
10
+ {
11
+ "source": "National Review",
12
+ "title": "The Decline of Civic Identity in Modern America",
13
+ "link": "https://example.com/vdh-nr-article "
14
+ },
15
+ {
16
+ "source": "Fox News",
17
+ "title": "Hanson Warns About Cultural Erosion",
18
+ "link": "https://example.com/vdh-fox-interview "
19
+ }
20
+ ]
21
+
22
+ tv_appearances = [
23
+ {
24
+ "show": "OANN Live Interview",
25
+ "date": "April 5, 2024",
26
+ "link": "https://example.com/vdh-oann-appearance1 "
27
+ },
28
+ {
29
+ "show": "Political Roundtable Discussion",
30
+ "date": "March 28, 2024",
31
+ "link": "https://example.com/vdh-oann-appearance2 "
32
+ }
33
+ ]
34
+
35
+ books = [
36
+ {
37
+ "title": "The Dying Citizen: How Progressive Elites, Tribalism, and Globalization Are Destroying the Idea of America",
38
+ "link": "https://www.amazon.com/Dying-Citizen-Progressive-Globalization-Destroying-ebook/dp/B08W4ZZTTP?r"
39
+ },
40
+ {
41
+ "title": "The Second World Wars: How the First Global Conflict Was Fought and Won",
42
+ "link": " https://www.amazon.com/Second-World-Wars-Global-Conflict-ebook/dp/B01N808V2J "
43
+ }
44
+ ]
45
+
46
+ # === Helper Functions ===
47
+ def display_links(data):
48
+ return "\n".join([f"- [{item['title']}]({item['link']})" for item in data])
49
+
50
+ def submit_takedown_request(name, email, message):
51
+ # In a real implementation, this would send an email or log the request
52
+ return f"Thank you, {name}. Your request has been received. We will respond to {email} shortly."
53
+
54
+ # === Gradio Interface ===
55
+ with gr.Blocks(theme="soft") as demo:
56
+ gr.Markdown(
57
+ """
58
+ # Doctor Victor Davis Hanson News & Publications Aggregator
59
+
60
+ This app aggregates publicly available mentions and publications related to **Dr. Victor Davis Hanson**,
61
+ a public academic figure known for their commentary on politics and policy. The purpose of this tool is to provide
62
+ a centralized resource for tracking appearances, articles, interviews, and published works β€” intended for research,
63
+ media monitoring, and academic study.
64
+
65
+ > πŸ” *Note: This model does not express opinions, endorse views, or verify accuracy. Users are encouraged to consult original sources for context.*
66
+ """
67
+ )
68
+
69
+ with gr.Tab("News Mentions"):
70
+ gr.Markdown(display_links(news_mentions))
71
+
72
+ with gr.Tab("TV Appearances"):
73
+ gr.Markdown(display_links(tv_appearances))
74
+
75
+ with gr.Tab("Books"):
76
+ gr.Markdown("## πŸ“š Books by Dr. Victor Davis Hanson\n")
77
+ gr.Markdown(display_links(books))
78
+ gr.Markdown(
79
+ "> πŸ“˜ These links open directly to Amazon product pages. No user data is collected via these links."
80
+ )
81
+
82
+ gr.Markdown(
83
+ """
84
+ ## βš–οΈ Legal & Ethical Notice
85
+
86
+ - **Fair Use**: Quoted headlines and excerpts fall under U.S. fair use doctrine for purposes of research, criticism, and news reporting.
87
+ - **GDPR Compliance**: This app does not collect personal data about users or store unnecessary personal information about the subject.
88
+ - **Right to Be Forgotten**: If the individual or any third party requests removal of content or data, please use the Contact tab.
89
+ - **No Affiliate Marketing**: We do not use Amazon affiliate links or earn revenue from book referrals.
90
+ """
91
+ )
92
+
93
+ # Launch the app
94
+ demo.launch()