Abby Reynolds commited on
Commit
07745b1
·
2 Parent(s): 866715fb5b28f1

Merge pull request #1 from MrinalGoel643/mrinal-dev

Browse files
Files changed (4) hide show
  1. .gitignore +1 -0
  2. README.md +11 -0
  3. main.py +73 -0
  4. requirements.txt +1 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ venv
README.md CHANGED
@@ -1,2 +1,13 @@
1
  # MetDataAnalysis
2
  Bootcamp Final Project
 
 
 
 
 
 
 
 
 
 
 
 
1
  # MetDataAnalysis
2
  Bootcamp Final Project
3
+
4
+ ## How to run
5
+ ### Create your virtual environment
6
+ `python3 -m venv venv`
7
+ ### Activate your virtual environment
8
+ `source venv/bin/activate`
9
+ ### Install dependencies
10
+ `pip install -r requirements.txt`
11
+ ### Run streamlit app
12
+ `streamlit run main.py`
13
+
main.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Page setup
4
+ st.set_page_config(page_title="The METrics", layout="centered")
5
+
6
+ st.markdown("<h1 style='text-align: center;'>The METrics</h1>", unsafe_allow_html=True)
7
+ st.markdown("<h4 style='text-align: center;'>Data Analysis of the Met Museum's Art Collection</h4>",
8
+ unsafe_allow_html=True)
9
+
10
+ st.write("")
11
+
12
+ # CSS for fixed-height image boxes
13
+ st.markdown(
14
+ """
15
+ <style>
16
+ .img-box {
17
+ height: 150px;
18
+ width: 150px;
19
+ overflow: hidden;
20
+ border: 1px solid #ccc;
21
+ border-radius: 6px;
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ }
26
+ .img-box img {
27
+ height: 100%;
28
+ width: auto;
29
+ object-fit: cover;
30
+ }
31
+ </style>
32
+ """,
33
+ unsafe_allow_html=True
34
+ )
35
+
36
+ # Columns with fixed-height images
37
+ col1, col2, col3 = st.columns(3)
38
+
39
+ with col1:
40
+ st.markdown(
41
+ "<div class='img-box'><img src='https://images.metmuseum.org/CRDImages/ep/web-large/DP-29324-001.jpg'></div>",
42
+ unsafe_allow_html=True
43
+ )
44
+ with col2:
45
+ st.markdown(
46
+ "<div class='img-box'><img src='https://images.metmuseum.org/CRDImages/ad/web-large/DP124705.jpg'></div>",
47
+ unsafe_allow_html=True
48
+ )
49
+ with col3:
50
+ st.markdown(
51
+ "<div class='img-box'><img src='https://images.metmuseum.org/CRDImages/gr/web-large/DP21847edited.jpg'></div>",
52
+ unsafe_allow_html=True
53
+ )
54
+
55
+ st.write("")
56
+ st.write("")
57
+ # Search bar
58
+ st.markdown("""
59
+ <div style='display: flex; justify-content: center;'>
60
+ <input type="text" placeholder=" 🔎 Search Met's Art Collection...."
61
+ style="padding: 10px; width: 250px; border-radius: 20px; border: 1px solid #ccc;">
62
+ </div>
63
+ """, unsafe_allow_html=True)
64
+
65
+ st.write("")
66
+
67
+ # Footer
68
+ st.markdown("""
69
+ <div style='position: fixed; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 12px;'>
70
+ <span style="font-size: 14px;">ℹ️ Met API and data related information is available at –
71
+ <a href="https://metmuseum.github.io/" target="_blank">https://metmuseum.github.io/</a></span>
72
+ </div>
73
+ """, unsafe_allow_html=True)
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ streamlit==1.48.1