Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,83 +128,7 @@ tree = """
|
|
| 128 |
}
|
| 129 |
</style>
|
| 130 |
"""
|
| 131 |
-
fire = """
|
| 132 |
-
<div class="fire">
|
| 133 |
-
<div class="flames"></div>
|
| 134 |
-
<div class="smoke"></div>
|
| 135 |
-
</div>
|
| 136 |
-
<style>
|
| 137 |
-
.fire {
|
| 138 |
-
display: flex;
|
| 139 |
-
flex-direction: column;
|
| 140 |
-
align-items: center;
|
| 141 |
-
justify-content: center;
|
| 142 |
-
align-items: center;
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
.flames {
|
| 146 |
-
width: 100px;
|
| 147 |
-
height: 100px;
|
| 148 |
-
background: radial-gradient(circle at center, #ff9800 0%, #ff5722 100%);
|
| 149 |
-
border-radius: 50%;
|
| 150 |
-
transform: translateY(10px);
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
.flames:before {
|
| 154 |
-
content: "";
|
| 155 |
-
position: absolute;
|
| 156 |
-
z-index: -1;
|
| 157 |
-
width: 100%;
|
| 158 |
-
height: 100%;
|
| 159 |
-
background: radial-gradient(circle at center, #fff 0%, #ff9800 50%, #ff5722 80%);
|
| 160 |
-
border-radius: 50%;
|
| 161 |
-
filter: blur(20px);
|
| 162 |
-
opacity: 0.3;
|
| 163 |
-
}
|
| 164 |
-
|
| 165 |
-
.smoke {
|
| 166 |
-
width: 50px;
|
| 167 |
-
height: 50px;
|
| 168 |
-
background: #ccc;
|
| 169 |
-
border-radius: 50%;
|
| 170 |
-
position: relative;
|
| 171 |
-
top: -30px;
|
| 172 |
-
animation: smoke 2s infinite;
|
| 173 |
-
transform-origin: center center;
|
| 174 |
-
}
|
| 175 |
-
|
| 176 |
-
.smoke:before {
|
| 177 |
-
content: "";
|
| 178 |
-
position: absolute;
|
| 179 |
-
width: 60px;
|
| 180 |
-
height: 60px;
|
| 181 |
-
background: #eee;
|
| 182 |
-
border-radius: 50%;
|
| 183 |
-
top: 0;
|
| 184 |
-
left: 0;
|
| 185 |
-
opacity: 0.4;
|
| 186 |
-
}
|
| 187 |
-
|
| 188 |
-
.smoke:after {
|
| 189 |
-
content: "";
|
| 190 |
-
position: absolute;
|
| 191 |
-
width: 80px;
|
| 192 |
-
height: 80px;
|
| 193 |
-
background: #ddd;
|
| 194 |
-
border-radius: 50%;
|
| 195 |
-
top: -10px;
|
| 196 |
-
left: -10px;
|
| 197 |
-
opacity: 0.3;
|
| 198 |
-
}
|
| 199 |
|
| 200 |
-
@keyframes smoke {
|
| 201 |
-
0% { transform: scale(1); opacity: 0.4; }
|
| 202 |
-
50% { transform: scale(1.2); opacity: 0.2; }
|
| 203 |
-
100% { transform: scale(1.4); opacity: 0; }
|
| 204 |
-
}
|
| 205 |
-
|
| 206 |
-
</style>
|
| 207 |
-
"""
|
| 208 |
|
| 209 |
with col2:
|
| 210 |
@st.cache(suppress_st_warning=True, allow_output_mutation=True)
|
|
@@ -262,9 +186,7 @@ with col2:
|
|
| 262 |
if text or aButton:
|
| 263 |
with st.spinner('Wait for it...'):
|
| 264 |
st.success(predict(text))
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
else:
|
| 268 |
-
st.markdown(fire, unsafe_allow_html=True)
|
| 269 |
|
| 270 |
|
|
|
|
| 128 |
}
|
| 129 |
</style>
|
| 130 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
with col2:
|
| 134 |
@st.cache(suppress_st_warning=True, allow_output_mutation=True)
|
|
|
|
| 186 |
if text or aButton:
|
| 187 |
with st.spinner('Wait for it...'):
|
| 188 |
st.success(predict(text))
|
| 189 |
+
st.markdown(tree, unsafe_allow_html=True)
|
| 190 |
+
|
|
|
|
|
|
|
| 191 |
|
| 192 |
|