-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHome.py
More file actions
86 lines (70 loc) · 2.76 KB
/
Home.py
File metadata and controls
86 lines (70 loc) · 2.76 KB
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
76
77
78
79
80
81
82
83
84
85
86
import pandas as pd
import streamlit as st
from PIL import Image
import functions
# Streamlit layout
st.set_page_config(layout='wide')
# Create placeholders for each column
col1, col2 = st.columns([1, 1])
# Content for column 1
with col1:
circular_image_centered = functions.make_circle_in_column('images/photo.png',
circle_size=(250, 250),
canvas_width_multiplier=3)
st.image(circular_image_centered, use_column_width=True)
functions.add_space(1)
# Content for column 2
with col2:
functions.add_space(3)
st.title('Chad ONeal')
content = """
At present, I hold a role as a Software Quality
Assurance Engineer in the dynamic and innovative development
team at RegScale. In this capacity, I am fully committed to
providing robust support to our Senior Developers, assisting
them with their various requirements and ensuring the smooth
execution of our collaborative projects.
"""
st.info(content)
content2 = """
Below you can find some of the apps I have built in Python. Feel free to contact me!
"""
st.write(content2)
st.markdown("""---""")
# Rows 3 & 4
df = pd.read_csv('data.csv', sep=';')
standard_size = (550, 300) # Define a standard size for all images
col3, _, col4 = st.columns([1.3, 0.3, 1.55]) # Unseen column for spacing
with col3:
for index, row in df[:10].iterrows():
st.header(row['title'])
st.write(row['description'])
functions.add_space(3)
image_path = 'images/' + row['image']
img = Image.open(image_path)
img = img.resize(standard_size)
img.save("temp_img.png")
img_base64 = functions.get_image_base64("temp_img.png")
st.markdown(f'<img src="data:image/png;base64,{img_base64}"'
f' style="max-width: 90%; height: auto;">',
unsafe_allow_html=True)
functions.add_space(4)
st.write(f"[SourceCode]({row['url']})")
st.markdown("""---""")
with col4:
for index, row in df[10:].iterrows():
st.header(row['title'])
st.write(row['description'])
functions.add_space(3)
image_path = 'images/' + row['image']
img = Image.open(image_path)
img = img.resize(standard_size)
img.save("temp_img.png")
img_base64 = functions.get_image_base64("temp_img.png")
# Display the image using Markdown with right alignment
st.markdown(f'<img src="data:image/png;base64,{img_base64}"'
f' style="max-width: 90%; height: auto; margin-left: 10%;">',
unsafe_allow_html=True)
functions.add_space(4)
st.write(f"[SourceCode]({row['url']})")
st.markdown("""---""")