File size: 2,215 Bytes
d9e5316
 
0569978
d9e5316
 
 
 
b708b7e
d9e5316
 
 
 
 
 
109ac3d
 
 
 
 
 
 
 
 
 
 
 
b708b7e
 
 
 
 
 
d9e5316
 
 
 
 
0569978
d9e5316
0569978
 
b708b7e
 
0569978
 
 
 
 
6f01629
0569978
1a3c129
6f01629
 
 
 
1a3c129
5a95970
 
 
 
109ac3d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
71
72
73
74
75
import streamlit as st
from PIL import Image
import os

# Set page config to make the background dark blue
st.set_page_config(page_title="My App", layout="centered")

# Add CSS for custom background color and text styling
st.markdown(
    """
    <style>
    .stApp {
        background-color: #00008B;
    }
    .custom-text {
        color: white;
        font-size: 2em;
        text-align: center;
        margin-bottom: 10px;
    }
    .summary-text {
        color: white;
        font-size: 1.5em;
        text-align: center;
        margin-bottom: 20px;
    }
    .image-caption {
        color: white;
        font-size: 3em;
        text-align: center;
        margin-bottom: 10px;
    }
    </style>
    """,
    unsafe_allow_html=True
)

# Define function to load and display images with error handling
def display_image(image_path, caption):
    try:
        image = Image.open(image_path)
        st.markdown(f'<div class="image-caption">{caption}</div>', unsafe_allow_html=True)
        st.image(image, use_column_width=True)
    except FileNotFoundError:
        st.error(f"File not found: {image_path}")
    except Exception as e:
        st.error(f"An error occurred while loading {image_path}: {e}")

# List of image files with their captions and correct file extensions in the specified order
image_files = [
    ("head10.JPG", "Head 10"),
    ("idm_overlap.jpg", "IDM Overlap"),
    ("idm.JPG", "IDM"),
    ("topic_groups.JPG", "Topic Groups"),
    ("similarity_matrix.JPG", "Similarity Matrix"),
    ("heirarchy_cluster.JPG", "Hierarchy Cluster"),
]

# Display images
for file, caption in image_files:
    display_image(file, caption)

# Display the specified text parts
st.markdown('<div class="custom-text">It was pretty metal at the grocery store today. #Covid_19</div>', unsafe_allow_html=True)
st.markdown('<div class="summary-text">summary: It was pretty metal at the grocery store today. #Covid_19 - a video of a metal event at a grocery store.</div>', unsafe_allow_html=True)

# Continue displaying the remaining images
remaining_images = [
    ("sentiment.JPG", "Sentiment"),
    ("accuracy.JPG", "Accuracy")
]

for file, caption in remaining_images:
    display_image(file, caption)