Maslov-Artem
commited on
Commit
·
1687004
1
Parent(s):
d632bd4
added images
Browse files- .gitattributes +2 -0
- app.py +45 -8
- doctor.jpg +0 -0
- tg_toxic.png +3 -0
- toxic-in-chat-mda-toxic.gif +3 -0
.gitattributes
CHANGED
@@ -37,3 +37,5 @@ space_main_background.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
37 |
main_background.png filter=lfs diff=lfs merge=lfs -text
|
38 |
text_generation.png filter=lfs diff=lfs merge=lfs -text
|
39 |
space_background.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
37 |
main_background.png filter=lfs diff=lfs merge=lfs -text
|
38 |
text_generation.png filter=lfs diff=lfs merge=lfs -text
|
39 |
space_background.jpeg filter=lfs diff=lfs merge=lfs -text
|
40 |
+
tg_toxic.png filter=lfs diff=lfs merge=lfs -text
|
41 |
+
toxic-in-chat-mda-toxic.gif filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -74,23 +74,48 @@ project_colaborators = """
|
|
74 |
"""
|
75 |
|
76 |
st.markdown(about, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
static_toxicity_path = "https://imagizer.imageshack.com/v2/480x360q70/r/924/L4Ditq.jpg"
|
78 |
animated_toxicity_path = (
|
79 |
"https://i.kym-cdn.com/photos/images/original/001/264/967/cdc.gif"
|
80 |
)
|
|
|
81 |
animated_enlighten_path = "https://gifdb.com/images/high/zen-meditation-chakras-illustration-6lujnenasnfmn8dt.gif"
|
82 |
static_enlighten_path = "https://imagizer.imageshack.com/v2/668x500q70/r/922/bpoy6G.jpg"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
# Toxicity image HTML
|
85 |
toxicity_html = f"""
|
86 |
<div class="text-shadow">
|
87 |
<a href="review_predictor" target="_self">
|
88 |
-
<img src="{
|
89 |
</a>
|
90 |
<style>
|
91 |
/* Define the hover state for the image */
|
92 |
.toxicity-image:hover {{
|
93 |
-
content: url("{
|
94 |
transform: scale(1.1); /* Enlarge the image by 10% */
|
95 |
transition: transform 0.5s ease; /* Add smooth transition */
|
96 |
}}
|
@@ -98,16 +123,16 @@ toxicity_html = f"""
|
|
98 |
</div>
|
99 |
"""
|
100 |
|
101 |
-
#
|
102 |
-
|
103 |
<div class="text-shadow">
|
104 |
-
<a href="
|
105 |
-
<img src="{
|
106 |
</a>
|
107 |
<style>
|
108 |
/* Define the hover state for the image */
|
109 |
-
.
|
110 |
-
content: url("{
|
111 |
transform: scale(1.1); /* Enlarge the image by 10% */
|
112 |
transition: transform 0.5s ease; /* Add smooth transition */
|
113 |
}}
|
@@ -115,6 +140,16 @@ enlighten_html = f"""
|
|
115 |
</div>
|
116 |
"""
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
# Add shadow to text content
|
119 |
text_shadow_style = """
|
120 |
<style>
|
@@ -135,4 +170,6 @@ st.markdown(page_1, unsafe_allow_html=True)
|
|
135 |
st.markdown(toxicity_html, unsafe_allow_html=True)
|
136 |
st.markdown(page_2, unsafe_allow_html=True)
|
137 |
st.markdown(enlighten_html, unsafe_allow_html=True)
|
|
|
|
|
138 |
st.markdown(project_colaborators, unsafe_allow_html=True)
|
|
|
74 |
"""
|
75 |
|
76 |
st.markdown(about, unsafe_allow_html=True)
|
77 |
+
static_review_path = "http://imagizer.imageshack.com/v2/667x500q90/r/922/fHrktQ.jpg"
|
78 |
+
animated_review_path = (
|
79 |
+
"https://gifdb.com/images/high/neil-patrick-as-a-doctor-zj5buv1gsoe0nsy2.gif"
|
80 |
+
)
|
81 |
+
|
82 |
+
|
83 |
static_toxicity_path = "https://imagizer.imageshack.com/v2/480x360q70/r/924/L4Ditq.jpg"
|
84 |
animated_toxicity_path = (
|
85 |
"https://i.kym-cdn.com/photos/images/original/001/264/967/cdc.gif"
|
86 |
)
|
87 |
+
|
88 |
animated_enlighten_path = "https://gifdb.com/images/high/zen-meditation-chakras-illustration-6lujnenasnfmn8dt.gif"
|
89 |
static_enlighten_path = "https://imagizer.imageshack.com/v2/668x500q70/r/922/bpoy6G.jpg"
|
90 |
+
# Toxicity image HTML
|
91 |
+
# Enlightenment image HTML
|
92 |
+
enlighten_html = f"""
|
93 |
+
<div class="text-shadow">
|
94 |
+
<a href="text_generator" target="_self">
|
95 |
+
<img src="{static_enlighten_path}" width="400" class="enlighten-image" />
|
96 |
+
</a>
|
97 |
+
<style>
|
98 |
+
/* Define the hover state for the image */
|
99 |
+
.enlighten-image:hover {{
|
100 |
+
content: url("{animated_enlighten_path}");
|
101 |
+
transform: scale(1.1); /* Enlarge the image by 10% */
|
102 |
+
transition: transform 0.5s ease; /* Add smooth transition */
|
103 |
+
}}
|
104 |
+
</style>
|
105 |
+
</div>
|
106 |
+
"""
|
107 |
+
|
108 |
|
109 |
# Toxicity image HTML
|
110 |
toxicity_html = f"""
|
111 |
<div class="text-shadow">
|
112 |
<a href="review_predictor" target="_self">
|
113 |
+
<img src="{static_review_path}" width="400" class="toxicity-image" />
|
114 |
</a>
|
115 |
<style>
|
116 |
/* Define the hover state for the image */
|
117 |
.toxicity-image:hover {{
|
118 |
+
content: url("{animated_review_path}");
|
119 |
transform: scale(1.1); /* Enlarge the image by 10% */
|
120 |
transition: transform 0.5s ease; /* Add smooth transition */
|
121 |
}}
|
|
|
123 |
</div>
|
124 |
"""
|
125 |
|
126 |
+
# Telegram image HTML
|
127 |
+
tg_html = f"""
|
128 |
<div class="text-shadow">
|
129 |
+
<a href="telegram" target="_self">
|
130 |
+
<img src="{static_toxicity_path}" width="400" class="tg-image" />
|
131 |
</a>
|
132 |
<style>
|
133 |
/* Define the hover state for the image */
|
134 |
+
.tg-image:hover {{
|
135 |
+
content: url("{animated_toxicity_path}");
|
136 |
transform: scale(1.1); /* Enlarge the image by 10% */
|
137 |
transition: transform 0.5s ease; /* Add smooth transition */
|
138 |
}}
|
|
|
140 |
</div>
|
141 |
"""
|
142 |
|
143 |
+
# Page 2 content
|
144 |
+
page_3 = """
|
145 |
+
<div class="text-shadow">
|
146 |
+
<h1>Toxicity Assessment Bot</h1>
|
147 |
+
|
148 |
+
<p class="bigger">Find out how toxic comments are</p>
|
149 |
+
</div>
|
150 |
+
"""
|
151 |
+
|
152 |
+
|
153 |
# Add shadow to text content
|
154 |
text_shadow_style = """
|
155 |
<style>
|
|
|
170 |
st.markdown(toxicity_html, unsafe_allow_html=True)
|
171 |
st.markdown(page_2, unsafe_allow_html=True)
|
172 |
st.markdown(enlighten_html, unsafe_allow_html=True)
|
173 |
+
st.markdown(page_3, unsafe_allow_html=True)
|
174 |
+
st.markdown(tg_html, unsafe_allow_html=True)
|
175 |
st.markdown(project_colaborators, unsafe_allow_html=True)
|
doctor.jpg
ADDED
![]() |
tg_toxic.png
ADDED
![]() |
Git LFS Details
|
toxic-in-chat-mda-toxic.gif
ADDED
![]() |
Git LFS Details
|