import streamlit as st import pandas as pd import folium from streamlit_folium import st_folium # Set the title of the Streamlit app st.title("Conjunto de datos de IA agentica multimodal a través de Uber 3 | Multimodal Agentic AI via Uber Dataset 3") # Load and display the Uber dataset @st.cache_data # Cache the dataframe to improve performance def load_data(): return pd.read_csv('uber-raw-data-may14.csv') # Load the Uber dataset df = load_data() # Display a subset of the dataframe (rows 10 to 20) st.subheader("Trips per Hour (Rows 10 to 20)") st.dataframe(df.iloc[10:21]) # Display rows 10 to 20 # Load and display videos video_files = [f'analisis_video_{i}.mp4' for i in range(1, 14)] # Generate video filenames for video_file in video_files: try: with open(video_file, 'rb') as f: video_bytes = f.read() st.video(video_bytes) except FileNotFoundError: st.warning(f"Video file {video_file} not found.") # Load and display the Folium map st.subheader("Trips Map") try: # Load the Folium map from the HTML file with open('trips_map.html', 'r', encoding='utf-8') as f: map_html = f.read() # Display the map using st_folium st.components.v1.html(map_html, width=700, height=500) except FileNotFoundError: st.warning("Folium map file 'trips_map.html' not found.")