Spaces:
No application file
No application file
Liss, Alex (NYC-HUG)
commited on
Commit
Β·
dfb4311
1
Parent(s):
50ab217
fixing static game search component
Browse files- components/.gradio/certificate.pem +31 -0
- components/game_recap_component.py +194 -48
- data/april_11_multimedia_data_collect/new_final_april 11/schedule_with_result_april_11.csv +18 -18
- data/april_11_multimedia_data_collect/z_old/z_schedule_with_result_april_11_z.csv +18 -0
- docs/requirements.md +5 -2
components/.gradio/certificate.pem
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-----BEGIN CERTIFICATE-----
|
2 |
+
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
|
31 |
+
-----END CERTIFICATE-----
|
components/game_recap_component.py
CHANGED
@@ -1,82 +1,228 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import os
|
|
|
4 |
|
5 |
def create_game_recap_component(game_data=None):
|
6 |
"""
|
7 |
-
Creates a Gradio component to display game information.
|
8 |
Args:
|
9 |
game_data (dict, optional): Game data to display. If None, loads from CSV.
|
10 |
Returns:
|
11 |
-
gr.
|
12 |
"""
|
13 |
try:
|
|
|
|
|
14 |
# Load game schedule if no game data provided
|
15 |
if game_data is None:
|
16 |
-
|
17 |
-
schedule_path = os.path.join(current_dir, "data", "april_11_multimedia_data_collect",
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
df = pd.read_csv(schedule_path)
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
# Extract game details
|
22 |
match_number = game_data.get('Match Number', 'N/A')
|
23 |
date = game_data.get('Date', 'N/A')
|
24 |
location = game_data.get('Location', 'N/A')
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
home_logo = game_data.get('home_team_logo_url', '')
|
28 |
away_logo = game_data.get('away_team_logo_url', '')
|
|
|
|
|
29 |
result = game_data.get('Result', 'N/A')
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
winner = None
|
34 |
if result != 'N/A':
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
except Exception as e:
|
71 |
print(f"Error creating game recap component: {str(e)}")
|
72 |
# Return a simple error message component
|
73 |
-
|
74 |
-
gr.Markdown("β οΈ Error loading game recap. Please try again later.")
|
75 |
-
return error_component
|
76 |
|
77 |
# Test the component when run directly
|
78 |
if __name__ == "__main__":
|
79 |
demo = gr.Blocks()
|
80 |
with demo:
|
81 |
game_recap = create_game_recap_component()
|
82 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import os
|
4 |
+
import html
|
5 |
|
6 |
def create_game_recap_component(game_data=None):
|
7 |
"""
|
8 |
+
Creates a Gradio component to display game information with a simple table layout.
|
9 |
Args:
|
10 |
game_data (dict, optional): Game data to display. If None, loads from CSV.
|
11 |
Returns:
|
12 |
+
gr.HTML: A Gradio component displaying the game recap.
|
13 |
"""
|
14 |
try:
|
15 |
+
current_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
16 |
+
|
17 |
# Load game schedule if no game data provided
|
18 |
if game_data is None:
|
19 |
+
# Try to load from the April 11 final data which includes highlight videos
|
20 |
+
schedule_path = os.path.join(current_dir, "data", "april_11_multimedia_data_collect",
|
21 |
+
"new_final_april 11", "schedule_with_result_april_11.csv")
|
22 |
+
if not os.path.exists(schedule_path):
|
23 |
+
# Fallback to the other schedule file
|
24 |
+
schedule_path = os.path.join(current_dir, "data", "april_11_multimedia_data_collect",
|
25 |
+
"schedule_with_result_and_logo_urls.csv")
|
26 |
+
|
27 |
df = pd.read_csv(schedule_path)
|
28 |
+
# use a single game for testing
|
29 |
+
game_row = df[df['Match Number'] == 92]
|
30 |
+
if len(game_row) > 0:
|
31 |
+
game_data = game_row.iloc[0].to_dict()
|
32 |
+
else:
|
33 |
+
game_data = df.iloc[0].to_dict() # Fallback to first game
|
34 |
|
35 |
# Extract game details
|
36 |
match_number = game_data.get('Match Number', 'N/A')
|
37 |
date = game_data.get('Date', 'N/A')
|
38 |
location = game_data.get('Location', 'N/A')
|
39 |
+
|
40 |
+
# Handle different column naming conventions between CSV files
|
41 |
+
home_team = game_data.get('Home Team', game_data.get('HomeTeam', 'N/A'))
|
42 |
+
away_team = game_data.get('Away Team', game_data.get('AwayTeam', 'N/A'))
|
43 |
+
|
44 |
+
# Get team logo URLs
|
45 |
home_logo = game_data.get('home_team_logo_url', '')
|
46 |
away_logo = game_data.get('away_team_logo_url', '')
|
47 |
+
|
48 |
+
# Get result and determine scores
|
49 |
result = game_data.get('Result', 'N/A')
|
50 |
+
home_score = away_score = 'N/A'
|
51 |
+
|
52 |
+
if result != 'N/A':
|
53 |
+
scores = result.split('-')
|
54 |
+
if len(scores) == 2:
|
55 |
+
home_score = scores[0].strip()
|
56 |
+
away_score = scores[1].strip()
|
57 |
+
|
58 |
+
# Determine winner for highlighting
|
59 |
winner = None
|
60 |
if result != 'N/A':
|
61 |
+
try:
|
62 |
+
home_score_int = int(home_score)
|
63 |
+
away_score_int = int(away_score)
|
64 |
+
winner = 'home' if home_score_int > away_score_int else 'away'
|
65 |
+
except ValueError:
|
66 |
+
winner = None
|
67 |
+
|
68 |
+
# Get highlight video URL
|
69 |
+
highlight_video_url = game_data.get('highlight_video_url', '')
|
70 |
+
|
71 |
+
# Create a simple HTML table layout
|
72 |
+
html_content = f"""
|
73 |
+
<style>
|
74 |
+
.game-recap-table {{
|
75 |
+
width: 100%;
|
76 |
+
border-collapse: collapse;
|
77 |
+
border: 1px solid #ddd;
|
78 |
+
border-radius: 8px;
|
79 |
+
overflow: hidden;
|
80 |
+
margin: 20px 0;
|
81 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
82 |
+
}}
|
83 |
+
|
84 |
+
.team-cell {{
|
85 |
+
padding: 15px;
|
86 |
+
text-align: left;
|
87 |
+
vertical-align: middle;
|
88 |
+
border-bottom: 1px solid #eee;
|
89 |
+
}}
|
90 |
+
|
91 |
+
.team-logo {{
|
92 |
+
width: 40px;
|
93 |
+
height: 40px;
|
94 |
+
object-fit: contain;
|
95 |
+
margin-right: 10px;
|
96 |
+
border-radius: 50%;
|
97 |
+
vertical-align: middle;
|
98 |
+
}}
|
99 |
+
|
100 |
+
.team-name {{
|
101 |
+
display: inline-block;
|
102 |
+
vertical-align: middle;
|
103 |
+
}}
|
104 |
+
|
105 |
+
.team-name-main {{
|
106 |
+
font-weight: bold;
|
107 |
+
font-size: 18px;
|
108 |
+
display: block;
|
109 |
+
}}
|
110 |
+
|
111 |
+
.team-name-sub {{
|
112 |
+
font-size: 14px;
|
113 |
+
color: #666;
|
114 |
+
display: block;
|
115 |
+
}}
|
116 |
+
|
117 |
+
.score-cell {{
|
118 |
+
padding: 15px;
|
119 |
+
text-align: right;
|
120 |
+
font-size: 32px;
|
121 |
+
font-weight: bold;
|
122 |
+
vertical-align: middle;
|
123 |
+
width: 80px;
|
124 |
+
}}
|
125 |
+
|
126 |
+
.winner-indicator {{
|
127 |
+
color: #ff6b00;
|
128 |
+
margin-left: 5px;
|
129 |
+
}}
|
130 |
+
|
131 |
+
.video-cell {{
|
132 |
+
background: linear-gradient(135deg, #e31837 0%, #e31837 50%, #4f2683 50%, #4f2683 100%);
|
133 |
+
color: white;
|
134 |
+
padding: 20px;
|
135 |
+
text-align: center;
|
136 |
+
vertical-align: middle;
|
137 |
+
}}
|
138 |
+
|
139 |
+
.vs-container {{
|
140 |
+
margin-bottom: 15px;
|
141 |
+
}}
|
142 |
+
|
143 |
+
.vs-logo {{
|
144 |
+
width: 30px;
|
145 |
+
height: 30px;
|
146 |
+
object-fit: contain;
|
147 |
+
margin: 0 5px;
|
148 |
+
border-radius: 50%;
|
149 |
+
background-color: rgba(255,255,255,0.2);
|
150 |
+
vertical-align: middle;
|
151 |
+
}}
|
152 |
+
|
153 |
+
.vs-text {{
|
154 |
+
font-weight: bold;
|
155 |
+
margin: 0 5px;
|
156 |
+
}}
|
157 |
+
|
158 |
+
.recap-text {{
|
159 |
+
font-size: 24px;
|
160 |
+
font-weight: bold;
|
161 |
+
margin: 10px 0;
|
162 |
+
}}
|
163 |
+
|
164 |
+
.video-link {{
|
165 |
+
display: inline-block;
|
166 |
+
padding: 8px 15px;
|
167 |
+
background-color: rgba(255,255,255,0.2);
|
168 |
+
color: white;
|
169 |
+
text-decoration: none;
|
170 |
+
border-radius: 4px;
|
171 |
+
margin-top: 10px;
|
172 |
+
}}
|
173 |
+
|
174 |
+
.video-link:hover {{
|
175 |
+
background-color: rgba(255,255,255,0.3);
|
176 |
+
}}
|
177 |
+
</style>
|
178 |
+
|
179 |
+
<table class="game-recap-table">
|
180 |
+
<tr>
|
181 |
+
<td class="team-cell">
|
182 |
+
<img src="{html.escape(away_logo)}" alt="{html.escape(away_team)} logo" class="team-logo">
|
183 |
+
<div class="team-name">
|
184 |
+
<span class="team-name-main">{html.escape(away_team.split(' ')[0] if ' ' in away_team else away_team)}</span>
|
185 |
+
<span class="team-name-sub">{html.escape(away_team.split(' ', 1)[1] if ' ' in away_team else '')}</span>
|
186 |
+
</div>
|
187 |
+
</td>
|
188 |
+
<td class="score-cell">
|
189 |
+
{away_score}{' <span class="winner-indicator">βΆ</span>' if winner == 'away' else ''}
|
190 |
+
</td>
|
191 |
+
<td class="video-cell" rowspan="2">
|
192 |
+
<div class="vs-container">
|
193 |
+
<img src="{html.escape(away_logo)}" alt="{html.escape(away_team)} logo" class="vs-logo">
|
194 |
+
<span class="vs-text">VS</span>
|
195 |
+
<img src="{html.escape(home_logo)}" alt="{html.escape(home_team)} logo" class="vs-logo">
|
196 |
+
</div>
|
197 |
+
<div class="recap-text">Recap</div>
|
198 |
+
{f'<a href="{html.escape(highlight_video_url)}" target="_blank" class="video-link">Watch Highlights</a>' if highlight_video_url else ''}
|
199 |
+
</td>
|
200 |
+
</tr>
|
201 |
+
<tr>
|
202 |
+
<td class="team-cell">
|
203 |
+
<img src="{html.escape(home_logo)}" alt="{html.escape(home_team)} logo" class="team-logo">
|
204 |
+
<div class="team-name">
|
205 |
+
<span class="team-name-main">{html.escape(home_team.split(' ')[0] if ' ' in home_team else home_team)}</span>
|
206 |
+
<span class="team-name-sub">{html.escape(home_team.split(' ', 1)[1] if ' ' in home_team else '')}</span>
|
207 |
+
</div>
|
208 |
+
</td>
|
209 |
+
<td class="score-cell">
|
210 |
+
{home_score}{' <span class="winner-indicator">βΆ</span>' if winner == 'home' else ''}
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
</table>
|
214 |
+
"""
|
215 |
+
|
216 |
+
return gr.HTML(html_content)
|
217 |
|
218 |
except Exception as e:
|
219 |
print(f"Error creating game recap component: {str(e)}")
|
220 |
# Return a simple error message component
|
221 |
+
return gr.HTML("<div style='padding: 1rem; color: red;'>β οΈ Error loading game recap. Please try again later.</div>")
|
|
|
|
|
222 |
|
223 |
# Test the component when run directly
|
224 |
if __name__ == "__main__":
|
225 |
demo = gr.Blocks()
|
226 |
with demo:
|
227 |
game_recap = create_game_recap_component()
|
228 |
+
demo.launch(share=True)
|
data/april_11_multimedia_data_collect/new_final_april 11/schedule_with_result_april_11.csv
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
Match Number,Round Number,Date,Location,
|
2 |
-
1,1,10/
|
3 |
-
28,2,15/09/2024 17:00,U.S. Bank Stadium,Minnesota Vikings,San Francisco 49ers,23 - 17,Loss,9c37ef4a-8887-4e16-a0e9-53dd21d0ed1c,"Purdy passed for 319 yards; Mason added 100 rushing yards, but the 49ers fell short.",https://www.youtube.com/watch?v=jTJw2uf-Pdg
|
4 |
-
38,3,22/09/2024 20:25,SoFi Stadium,Los Angeles Rams,San Francisco 49ers,27 - 24,Loss,b8c3e7f7-81ed-48c4-9a49-0897cac450e5,Purdy threw for 292 yards; Jauan Jennings had 175 receiving yards in a close loss.,https://www.youtube.com/watch?v=Y1dnhN-1ryU
|
5 |
-
55,4,29/09/2024 20:05,Levi's Stadium,San Francisco 49ers,New England Patriots,30 - 13,Win,b4b49323-c84d-4414-bbd4-de399145db28,Brock Purdy threw for 288 yards and a touchdown; Fred Warner returned an interception for a touchdown.,https://www.youtube.com/watch?v=NCUjGFJILLo
|
6 |
-
70,5,
|
7 |
-
92,6,11/10/
|
8 |
-
96,7,20/10/2024 20:25,Levi's Stadium,San Francisco 49ers,Kansas City Chiefs,18 - 28,Loss,c0efcedb-e8a0-4058-8ae8-df418a829c22,Specific game details are not available.,https://www.youtube.com/watch?v=4_xM1tOK-28
|
9 |
-
109,8,28/10/2024 00:20,Levi's Stadium,San Francisco 49ers,Dallas Cowboys,30 - 24,Win,9d3c8085-3864-4c86-9a47-6d91f9561e68,Specific game details are not available.,https://www.youtube.com/watch?v=7nTBwPljD-Q
|
10 |
-
149,10,10/11/
|
11 |
-
158,11,17/11/2024 21:05,Levi's Stadium,San Francisco 49ers,Seattle Seahawks,17 - 20,Loss,6ee0f83e-d738-43c7-95e2-472bdaa9c2e8,Geno Smith's last-minute touchdown run ended the Seahawks' losing streak against the 49ers.,https://www.youtube.com/watch?v=VMPRSGk7bUg
|
12 |
-
169,12,24/11/2024 21:25,Lambeau Field,Green Bay Packers,San Francisco 49ers,38 - 10,Loss,89aeb6ec-c102-442f-a2b2-862a58f08c72,"Despite losing Deebo Samuel early, the 49ers secured a narrow victory.",https://www.youtube.com/watch?v=rtBtGh02HvA
|
13 |
-
181,13,
|
14 |
-
199,14,
|
15 |
-
224,15,13/12/2024 01:15,Levi's Stadium,San Francisco 49ers,Los Angeles Rams,6 - 12,Loss,07182afe-36bf-44e4-a464-52a56e9e325d,"In a rainy defensive battle, the Rams secured victory with four field goals.",https://www.youtube.com/watch?v=3JfiboQ6ZC8
|
16 |
-
228,16,22/12/2024 21:25,Hard Rock Stadium,Miami Dolphins,San Francisco 49ers,29 - 17,Loss,0be9a14c-0017-46b8-96e8-7c446e78ea84,A high-scoring game marked by a scuffle involving Jauan Jennings; the 49ers fell short.,
|
17 |
-
246,17,31/12/2024 01:15,Levi's Stadium,San Francisco 49ers,Detroit Lions,34 - 40,Loss,a6af1ef1-eece-43c2-b98f-c20494003cfe,Specific game details are not available.,https://www.youtube.com/watch?v=AooNLyum7Ng
|
18 |
-
257,18,
|
|
|
1 |
+
Match Number,Round Number,Date,Location,Home Team,Away Team,Result,game_result,home_team_logo_url,away_team_logo_url,game_id,Summary,highlight_video_url
|
2 |
+
1,1,10/09/2024 00:15,Levi's Stadium,San Francisco 49ers,New York Jets,32 - 19,Win,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/nyj.png,7d5492b7-6372-4ab6-b878-a6ad10936f3b,"Quarterback Brock Purdy threw for 231 yards, with running back Jordan Mason rushing for 147 yards.",https://www.youtube.com/watch?v=igOb4mfV7To
|
3 |
+
28,2,15/09/2024 17:00,U.S. Bank Stadium,Minnesota Vikings,San Francisco 49ers,23 - 17,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/min.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,9c37ef4a-8887-4e16-a0e9-53dd21d0ed1c,"Purdy passed for 319 yards; Mason added 100 rushing yards, but the 49ers fell short.",https://www.youtube.com/watch?v=jTJw2uf-Pdg
|
4 |
+
38,3,22/09/2024 20:25,SoFi Stadium,Los Angeles Rams,San Francisco 49ers,27 - 24,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/lar.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,b8c3e7f7-81ed-48c4-9a49-0897cac450e5,Purdy threw for 292 yards; Jauan Jennings had 175 receiving yards in a close loss.,https://www.youtube.com/watch?v=Y1dnhN-1ryU
|
5 |
+
55,4,29/09/2024 20:05,Levi's Stadium,San Francisco 49ers,New England Patriots,30 - 13,Win,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/ne.png,b4b49323-c84d-4414-bbd4-de399145db28,Brock Purdy threw for 288 yards and a touchdown; Fred Warner returned an interception for a touchdown.,https://www.youtube.com/watch?v=NCUjGFJILLo
|
6 |
+
70,5,06/10/2024 20:05,Levi's Stadium,San Francisco 49ers,Arizona Cardinals,23 - 24,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/ari.png,efe67377-f218-4629-94d6-b0a28dae81b4,"Kyler Murray led a comeback, including a 50-yard touchdown run; Chad Ryland kicked the game-winning field goal.",https://www.youtube.com/watch?v=v62sybG_3Lk
|
7 |
+
92,6,11/10/2024 00:15,Lumen Field,Seattle Seahawks,San Francisco 49ers,24 - 36,Win,https://a.espncdn.com/i/teamlogos/nfl/500/sea.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,be924e35-6c00-470a-a82e-f77e89f2fca9,Geno Smith's late 13-yard touchdown run secured the Seahawks' victory.,https://www.youtube.com/watch?v=LaDE1QBC3Cc
|
8 |
+
96,7,20/10/2024 20:25,Levi's Stadium,San Francisco 49ers,Kansas City Chiefs,18 - 28,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/kc.png,c0efcedb-e8a0-4058-8ae8-df418a829c22,Specific game details are not available.,https://www.youtube.com/watch?v=4_xM1tOK-28
|
9 |
+
109,8,28/10/2024 00:20,Levi's Stadium,San Francisco 49ers,Dallas Cowboys,30 - 24,Win,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/dal.png,9d3c8085-3864-4c86-9a47-6d91f9561e68,Specific game details are not available.,https://www.youtube.com/watch?v=7nTBwPljD-Q
|
10 |
+
149,10,10/11/2024 18:00,Raymond James Stadium,Tampa Bay Buccaneers,San Francisco 49ers,20 - 23,Win,https://a.espncdn.com/i/teamlogos/nfl/500/tb.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,8c117905-4d53-4bfb-a85e-d4d0a52262a8,"The 49ers narrowly avoided a collapse, with Jake Moody's game-winning field goal.",https://www.youtube.com/watch?v=607mv01G8UU
|
11 |
+
158,11,17/11/2024 21:05,Levi's Stadium,San Francisco 49ers,Seattle Seahawks,17 - 20,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/sea.png,6ee0f83e-d738-43c7-95e2-472bdaa9c2e8,Geno Smith's last-minute touchdown run ended the Seahawks' losing streak against the 49ers.,https://www.youtube.com/watch?v=VMPRSGk7bUg
|
12 |
+
169,12,24/11/2024 21:25,Lambeau Field,Green Bay Packers,San Francisco 49ers,38 - 10,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/gb.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,89aeb6ec-c102-442f-a2b2-862a58f08c72,"Despite losing Deebo Samuel early, the 49ers secured a narrow victory.",https://www.youtube.com/watch?v=rtBtGh02HvA
|
13 |
+
181,13,02/12/2024 01:20,Highmark Stadium,Buffalo Bills,San Francisco 49ers,35 - 10,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/buf.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,051a9bbd-41b1-4946-b366-2202b9b84646,"Josh Allen scored touchdowns passing, rushing, and receiving, leading the Bills to victory.",
|
14 |
+
199,14,08/12/2024 21:25,Levi's Stadium,San Francisco 49ers,Chicago Bears,38 - 13,Win,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/chi.png,2bfc3060-5975-4c60-8cf2-cd359c318bcb,Specific game details are not available.,https://www.youtube.com/watch?v=qmzSVmVNaFg
|
15 |
+
224,15,13/12/2024 01:15,Levi's Stadium,San Francisco 49ers,Los Angeles Rams,6 - 12,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/lar.png,07182afe-36bf-44e4-a464-52a56e9e325d,"In a rainy defensive battle, the Rams secured victory with four field goals.",https://www.youtube.com/watch?v=3JfiboQ6ZC8
|
16 |
+
228,16,22/12/2024 21:25,Hard Rock Stadium,Miami Dolphins,San Francisco 49ers,29 - 17,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/mia.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,0be9a14c-0017-46b8-96e8-7c446e78ea84,A high-scoring game marked by a scuffle involving Jauan Jennings; the 49ers fell short.,
|
17 |
+
246,17,31/12/2024 01:15,Levi's Stadium,San Francisco 49ers,Detroit Lions,34 - 40,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,https://a.espncdn.com/i/teamlogos/nfl/500/det.png,a6af1ef1-eece-43c2-b98f-c20494003cfe,Specific game details are not available.,https://www.youtube.com/watch?v=AooNLyum7Ng
|
18 |
+
257,18,05/01/2025 21:25,State Farm Stadium,Arizona Cardinals,San Francisco 49ers,47 - 24,Loss,https://a.espncdn.com/i/teamlogos/nfl/500/ari.png,https://a.espncdn.com/i/teamlogos/nfl/500/sf.png,2c95b37b-b32d-4b30-a582-f04b8cbf12e4,Specific game details are not available.,https://www.youtube.com/watch?v=HfqGFWVdf9w
|
data/april_11_multimedia_data_collect/z_old/z_schedule_with_result_april_11_z.csv
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Match Number,Round Number,Date,Location,HomeTeam,AwayTeam,Result,game_result,game_id,Summary,highlight_video_url
|
2 |
+
1,1,10/9/24 0:15,Levi's Stadium,San Francisco 49ers,New York Jets,32 - 19,Win,7d5492b7-6372-4ab6-b878-a6ad10936f3b,"Quarterback Brock Purdy threw for 231 yards, with running back Jordan Mason rushing for 147 yards.",https://www.youtube.com/watch?v=igOb4mfV7To
|
3 |
+
28,2,15/09/2024 17:00,U.S. Bank Stadium,Minnesota Vikings,San Francisco 49ers,23 - 17,Loss,9c37ef4a-8887-4e16-a0e9-53dd21d0ed1c,"Purdy passed for 319 yards; Mason added 100 rushing yards, but the 49ers fell short.",https://www.youtube.com/watch?v=jTJw2uf-Pdg
|
4 |
+
38,3,22/09/2024 20:25,SoFi Stadium,Los Angeles Rams,San Francisco 49ers,27 - 24,Loss,b8c3e7f7-81ed-48c4-9a49-0897cac450e5,Purdy threw for 292 yards; Jauan Jennings had 175 receiving yards in a close loss.,https://www.youtube.com/watch?v=Y1dnhN-1ryU
|
5 |
+
55,4,29/09/2024 20:05,Levi's Stadium,San Francisco 49ers,New England Patriots,30 - 13,Win,b4b49323-c84d-4414-bbd4-de399145db28,Brock Purdy threw for 288 yards and a touchdown; Fred Warner returned an interception for a touchdown.,https://www.youtube.com/watch?v=NCUjGFJILLo
|
6 |
+
70,5,6/10/24 20:05,Levi's Stadium,San Francisco 49ers,Arizona Cardinals,23 - 24,Loss,efe67377-f218-4629-94d6-b0a28dae81b4,"Kyler Murray led a comeback, including a 50-yard touchdown run; Chad Ryland kicked the game-winning field goal.",https://www.youtube.com/watch?v=v62sybG_3Lk
|
7 |
+
92,6,11/10/24 0:15,Lumen Field,Seattle Seahawks,San Francisco 49ers,24 - 36,Win,be924e35-6c00-470a-a82e-f77e89f2fca9,Geno Smith's late 13-yard touchdown run secured the Seahawks' victory.,https://www.youtube.com/watch?v=LaDE1QBC3Cc
|
8 |
+
96,7,20/10/2024 20:25,Levi's Stadium,San Francisco 49ers,Kansas City Chiefs,18 - 28,Loss,c0efcedb-e8a0-4058-8ae8-df418a829c22,Specific game details are not available.,https://www.youtube.com/watch?v=4_xM1tOK-28
|
9 |
+
109,8,28/10/2024 00:20,Levi's Stadium,San Francisco 49ers,Dallas Cowboys,30 - 24,Win,9d3c8085-3864-4c86-9a47-6d91f9561e68,Specific game details are not available.,https://www.youtube.com/watch?v=7nTBwPljD-Q
|
10 |
+
149,10,10/11/24 18:00,Raymond James Stadium,Tampa Bay Buccaneers,San Francisco 49ers,20 - 23,Win,8c117905-4d53-4bfb-a85e-d4d0a52262a8,"The 49ers narrowly avoided a collapse, with Jake Moody's game-winning field goal.",https://www.youtube.com/watch?v=607mv01G8UU
|
11 |
+
158,11,17/11/2024 21:05,Levi's Stadium,San Francisco 49ers,Seattle Seahawks,17 - 20,Loss,6ee0f83e-d738-43c7-95e2-472bdaa9c2e8,Geno Smith's last-minute touchdown run ended the Seahawks' losing streak against the 49ers.,https://www.youtube.com/watch?v=VMPRSGk7bUg
|
12 |
+
169,12,24/11/2024 21:25,Lambeau Field,Green Bay Packers,San Francisco 49ers,38 - 10,Loss,89aeb6ec-c102-442f-a2b2-862a58f08c72,"Despite losing Deebo Samuel early, the 49ers secured a narrow victory.",https://www.youtube.com/watch?v=rtBtGh02HvA
|
13 |
+
181,13,2/12/24 1:20,Highmark Stadium,Buffalo Bills,San Francisco 49ers,35 - 10,Loss,051a9bbd-41b1-4946-b366-2202b9b84646,"Josh Allen scored touchdowns passing, rushing, and receiving, leading the Bills to victory.",
|
14 |
+
199,14,8/12/24 21:25,Levi's Stadium,San Francisco 49ers,Chicago Bears,38 - 13,Win,2bfc3060-5975-4c60-8cf2-cd359c318bcb,Specific game details are not available.,https://www.youtube.com/watch?v=qmzSVmVNaFg
|
15 |
+
224,15,13/12/2024 01:15,Levi's Stadium,San Francisco 49ers,Los Angeles Rams,6 - 12,Loss,07182afe-36bf-44e4-a464-52a56e9e325d,"In a rainy defensive battle, the Rams secured victory with four field goals.",https://www.youtube.com/watch?v=3JfiboQ6ZC8
|
16 |
+
228,16,22/12/2024 21:25,Hard Rock Stadium,Miami Dolphins,San Francisco 49ers,29 - 17,Loss,0be9a14c-0017-46b8-96e8-7c446e78ea84,A high-scoring game marked by a scuffle involving Jauan Jennings; the 49ers fell short.,
|
17 |
+
246,17,31/12/2024 01:15,Levi's Stadium,San Francisco 49ers,Detroit Lions,34 - 40,Loss,a6af1ef1-eece-43c2-b98f-c20494003cfe,Specific game details are not available.,https://www.youtube.com/watch?v=AooNLyum7Ng
|
18 |
+
257,18,5/1/25 21:25,State Farm Stadium,Arizona Cardinals,San Francisco 49ers,47 - 24,Loss,2c95b37b-b32d-4b30-a582-f04b8cbf12e4,Specific game details are not available.,https://www.youtube.com/watch?v=HfqGFWVdf9w
|
docs/requirements.md
CHANGED
@@ -229,6 +229,9 @@ Based on a review of the existing codebase and requirements, here's a structured
|
|
229 |
| **1.1 Complete data ingestion of team thumbnail images** | Download and integrate team logo files into the database | None |
|
230 |
| **1.1 data extracted on 4.13 β
** |
|
231 |
| **1.2 Build and test gradio components locally** | Create components using CSV files instead of Neo4j, including multimedia integration | 1.1 |
|
|
|
|
|
|
|
232 |
| **1.3 Develop memory system and UI integration with Zep** | Implement persona-based memory system with Zep | None |
|
233 |
|
234 |
**Demo 1 Milestone:** April 22
|
@@ -395,7 +398,7 @@ Implement the Team Search feature (Feature 1 from Feature Overview) with focus o
|
|
395 |
- Save as new version
|
396 |
- **Implementation:** Created a Python script to merge the schedule data with team logo URLs. The script maps team names to their corresponding logo URLs and adds two new columns to the schedule CSV: 'home_team_logo_url' and 'away_team_logo_url'. The merged data was saved as 'schedule_with_result_and_logo_urls.csv'.
|
397 |
|
398 |
-
4. **Static Gradio Component Development
|
399 |
- Create new component file
|
400 |
- Implement layout matching `game recap layout example.png`:
|
401 |
- Top row: away team elements
|
@@ -404,7 +407,7 @@ Implement the Team Search feature (Feature 1 from Feature Overview) with focus o
|
|
404 |
- Video preview box
|
405 |
- Use static assets for 49ers first game
|
406 |
- Implement responsive design
|
407 |
-
- **Implementation:** Created a reusable game recap component in `components/game_recap_component.py` that displays team logos, names, scores, and highlights the winning team. The component uses the data from the merged CSV file and applies the 49ers theme styling. The component was integrated into the main Gradio app and tested independently.
|
408 |
|
409 |
5. **Component Testing**
|
410 |
- Add component as first element in Gradio app
|
|
|
229 |
| **1.1 Complete data ingestion of team thumbnail images** | Download and integrate team logo files into the database | None |
|
230 |
| **1.1 data extracted on 4.13 β
** |
|
231 |
| **1.2 Build and test gradio components locally** | Create components using CSV files instead of Neo4j, including multimedia integration | 1.1 |
|
232 |
+
| **1.2.1 Team Result Search** | Returning queries about the team using a multi-media component | 1.1 |
|
233 |
+
| **1.2.1 Player Search** | Return queries about the player using a multi-media component | 1.1 |
|
234 |
+
| **1.2.3 Game Search** | Return queries about a game using a multi-media component | 1.1 |
|
235 |
| **1.3 Develop memory system and UI integration with Zep** | Implement persona-based memory system with Zep | None |
|
236 |
|
237 |
**Demo 1 Milestone:** April 22
|
|
|
398 |
- Save as new version
|
399 |
- **Implementation:** Created a Python script to merge the schedule data with team logo URLs. The script maps team names to their corresponding logo URLs and adds two new columns to the schedule CSV: 'home_team_logo_url' and 'away_team_logo_url'. The merged data was saved as 'schedule_with_result_and_logo_urls.csv'.
|
400 |
|
401 |
+
4. **Static Gradio Component Development π**
|
402 |
- Create new component file
|
403 |
- Implement layout matching `game recap layout example.png`:
|
404 |
- Top row: away team elements
|
|
|
407 |
- Video preview box
|
408 |
- Use static assets for 49ers first game
|
409 |
- Implement responsive design
|
410 |
+
- **Implementation:** Created a reusable game recap component in `components/game_recap_component.py` that displays team logos, names, scores, and highlights the winning team. The component uses the data from the merged CSV file and applies the 49ers theme styling. The component was integrated into the main Gradio app and tested independently. β What Needs Attention: Video player does not display links it shows 'link coming soon'
|
411 |
|
412 |
5. **Component Testing**
|
413 |
- Add component as first element in Gradio app
|