Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,7 @@ def home_page():
|
|
86 |
"description": "Experienced web developer with a focus on Streamlit, HF, Python, and modern web applications."
|
87 |
}
|
88 |
</script>
|
89 |
-
</head>
|
90 |
<body>
|
91 |
<img src="/static/images/banner.jpg" alt="Banner" width="100%">
|
92 |
<h2>Square and Fill Image App</h2>
|
@@ -124,6 +124,10 @@ def demo_page():
|
|
124 |
|
125 |
return f"""
|
126 |
<html>
|
|
|
|
|
|
|
|
|
127 |
<body>
|
128 |
<h2>Square Image Demo</h2>
|
129 |
<p>Image will be squared with color filler where applicable.</p>
|
@@ -141,6 +145,10 @@ def demo_page():
|
|
141 |
def application_page():
|
142 |
return """
|
143 |
<html>
|
|
|
|
|
|
|
|
|
144 |
<body>
|
145 |
<img src="/static/images/banner.jpg" alt="Banner" width="100%">
|
146 |
<h2>Square Image Application</h2>
|
@@ -186,10 +194,9 @@ async def upload_file(file: UploadFile = File(...)):
|
|
186 |
<img src="/static/images/banner.jpg" alt="Banner" width="100%">
|
187 |
<h2>Image successfully squared!</h2>
|
188 |
<img src='data:image/jpeg;base64,{display_encoded_img}' width="512" height="512" />
|
189 |
-
<
|
190 |
-
|
191 |
-
|
192 |
-
</a>
|
193 |
""",
|
194 |
media_type="text/html"
|
195 |
)
|
|
|
86 |
"description": "Experienced web developer with a focus on Streamlit, HF, Python, and modern web applications."
|
87 |
}
|
88 |
</script>
|
89 |
+
</head>
|
90 |
<body>
|
91 |
<img src="/static/images/banner.jpg" alt="Banner" width="100%">
|
92 |
<h2>Square and Fill Image App</h2>
|
|
|
124 |
|
125 |
return f"""
|
126 |
<html>
|
127 |
+
<head>
|
128 |
+
<title>Part of Idoia's Developer Portfolio - Innovating the Web</title>
|
129 |
+
<link rel="stylesheet" href="/static/styles/style.css">
|
130 |
+
</head>
|
131 |
<body>
|
132 |
<h2>Square Image Demo</h2>
|
133 |
<p>Image will be squared with color filler where applicable.</p>
|
|
|
145 |
def application_page():
|
146 |
return """
|
147 |
<html>
|
148 |
+
<head>
|
149 |
+
<title>Part of Idoia's Developer Portfolio - Innovating the Web</title>
|
150 |
+
<link rel="stylesheet" href="/static/styles/style.css">
|
151 |
+
</head>
|
152 |
<body>
|
153 |
<img src="/static/images/banner.jpg" alt="Banner" width="100%">
|
154 |
<h2>Square Image Application</h2>
|
|
|
194 |
<img src="/static/images/banner.jpg" alt="Banner" width="100%">
|
195 |
<h2>Image successfully squared!</h2>
|
196 |
<img src='data:image/jpeg;base64,{display_encoded_img}' width="512" height="512" />
|
197 |
+
<p><a href="data:image/jpeg;base64,{full_size_encoded_img}" download="squared_image.jpg">
|
198 |
+
Download Full-Size Image</a></p>
|
199 |
+
<p><a href="/">Back</a></p>
|
|
|
200 |
""",
|
201 |
media_type="text/html"
|
202 |
)
|