Jack Monas
		
	commited on
		
		
					Commit 
							
							·
						
						4cedfff
	
1
								Parent(s):
							
							ebe5f6f
								
gif
Browse files
    	
        app.py
    CHANGED
    
    | @@ -1,7 +1,8 @@ | |
| 1 | 
             
            import streamlit as st
         | 
| 2 | 
             
            import pandas as pd
         | 
| 3 | 
             
            import streamlit.components.v1 as components
         | 
| 4 | 
            -
             | 
|  | |
| 5 |  | 
| 6 | 
             
            def scoring_section():
         | 
| 7 | 
             
                # Title
         | 
| @@ -75,6 +76,23 @@ def main(): | |
| 75 | 
             
                    "Welcome to the World Model Challenge. This platform hosts three challenges "
         | 
| 76 | 
             
                    "designed to advance research in world models for robotics: Compression, Sampling, and Evaluation."
         | 
| 77 | 
             
                )
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 78 |  | 
| 79 | 
             
                st.markdown("---")
         | 
| 80 |  | 
|  | |
| 1 | 
             
            import streamlit as st
         | 
| 2 | 
             
            import pandas as pd
         | 
| 3 | 
             
            import streamlit.components.v1 as components
         | 
| 4 | 
            +
            import glob 
         | 
| 5 | 
            +
            import os
         | 
| 6 |  | 
| 7 | 
             
            def scoring_section():
         | 
| 8 | 
             
                # Title
         | 
|  | |
| 76 | 
             
                    "Welcome to the World Model Challenge. This platform hosts three challenges "
         | 
| 77 | 
             
                    "designed to advance research in world models for robotics: Compression, Sampling, and Evaluation."
         | 
| 78 | 
             
                )
         | 
| 79 | 
            +
                gif_folder = "assets/gifs"
         | 
| 80 | 
            +
                
         | 
| 81 | 
            +
                # Get all GIF file paths from the folder, sorted by name
         | 
| 82 | 
            +
                gif_paths = sorted(glob.glob(os.path.join(gif_folder, "*.gif")))
         | 
| 83 | 
            +
                
         | 
| 84 | 
            +
                # Display 4 GIFs per row
         | 
| 85 | 
            +
                for i in range(0, len(gif_paths), 4):
         | 
| 86 | 
            +
                    # Slice out a batch of 4 GIFs
         | 
| 87 | 
            +
                    row_gifs = gif_paths[i:i+4]
         | 
| 88 | 
            +
                    
         | 
| 89 | 
            +
                    # Create columns for this row
         | 
| 90 | 
            +
                    cols = st.columns(len(row_gifs))
         | 
| 91 | 
            +
                    
         | 
| 92 | 
            +
                    # Display each GIF in its own column
         | 
| 93 | 
            +
                    for col, gif_path in zip(cols, row_gifs):
         | 
| 94 | 
            +
                        col.image(gif_path, use_column_width=True)
         | 
| 95 | 
            +
             | 
| 96 |  | 
| 97 | 
             
                st.markdown("---")
         | 
| 98 |  |