Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files
README.md
CHANGED
|
@@ -1,19 +1,8 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Landing Page
|
| 3 |
-
emoji: 🚀
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: red
|
| 6 |
-
sdk: docker
|
| 7 |
-
app_port: 8501
|
| 8 |
-
tags:
|
| 9 |
-
- streamlit
|
| 10 |
-
pinned: false
|
| 11 |
-
short_description: Streamlit template space
|
| 12 |
-
---
|
| 13 |
|
| 14 |
-
#
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
# Company Apps
|
| 3 |
+
A simple Streamlit landing page for two Hugging Face Spaces.
|
| 4 |
|
| 5 |
+
## How to use
|
| 6 |
+
1. Edit `app.py` and replace all `YOUR_*` placeholders.
|
| 7 |
+
2. Put your images in `assets/logo.png`, `assets/app1.png`, `assets/app2.png` (replace placeholders).
|
| 8 |
+
3. Commit to your Streamlit Space.
|
app.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import streamlit as st
|
| 3 |
+
|
| 4 |
+
# ------------ CONFIG ------------
|
| 5 |
+
COMPANY_NAME = "YOUR_COMPANY_NAME"
|
| 6 |
+
TAGLINE = "Short value proposition goes here."
|
| 7 |
+
APP1 = {
|
| 8 |
+
"title": "YOUR_APP1_TITLE",
|
| 9 |
+
"url": "https://huggingface.co/spaces/YOUR_ORG/YOUR_APP1_SPACE",
|
| 10 |
+
"thumb": "assets/app1.png",
|
| 11 |
+
"blurb": "One‑line description for App 1.",
|
| 12 |
+
}
|
| 13 |
+
APP2 = {
|
| 14 |
+
"title": "YOUR_APP2_TITLE",
|
| 15 |
+
"url": "https://huggingface.co/spaces/YOUR_ORG/YOUR_APP2_SPACE",
|
| 16 |
+
"thumb": "assets/app2.png",
|
| 17 |
+
"blurb": "One‑line description for App 2.",
|
| 18 |
+
}
|
| 19 |
+
LOGO_PATH = "assets/logo.png"
|
| 20 |
+
|
| 21 |
+
# ------------ PAGE META ------------
|
| 22 |
+
st.set_page_config(
|
| 23 |
+
page_title=f"{COMPANY_NAME} — Apps",
|
| 24 |
+
page_icon=LOGO_PATH,
|
| 25 |
+
layout="wide",
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
# ------------ GLOBAL STYLES ------------
|
| 29 |
+
st.markdown(
|
| 30 |
+
"""
|
| 31 |
+
<style>
|
| 32 |
+
.hero {text-align:center; margin: 2rem 0 2.75rem;}
|
| 33 |
+
.hero img {width: 92px; height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.12));}
|
| 34 |
+
.hero h1 {font-size: 2.2rem; margin: .75rem 0 .25rem;}
|
| 35 |
+
.hero p {color: #5a5f6a; margin: 0 auto; max-width: 720px;}
|
| 36 |
+
|
| 37 |
+
.grid {display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px;}
|
| 38 |
+
.card {background: white; border-radius: 18px; padding: 18px; border: 1px solid rgba(0,0,0,.06);
|
| 39 |
+
box-shadow: 0 4px 18px rgba(0,0,0,.05); transition: transform .12s ease, box-shadow .12s ease;}
|
| 40 |
+
.card:hover {transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08);}
|
| 41 |
+
.thumb {border-radius: 14px; width: 100%; height: 220px; object-fit: cover; border: 1px solid rgba(0,0,0,.06);}
|
| 42 |
+
.card h3 {margin: 12px 0 6px;}
|
| 43 |
+
.card p {color: #5a5f6a; min-height: 40px;}
|
| 44 |
+
.card a.btn {display:inline-block; padding: 10px 14px; border-radius: 12px; border: 1px solid #e6e7ea; text-decoration:none;}
|
| 45 |
+
.btn-primary {background:#111827; color:white; border-color:#111827;}
|
| 46 |
+
.btn-primary:hover {filter: brightness(0.92);}
|
| 47 |
+
|
| 48 |
+
/* Make Streamlit body a tad wider */
|
| 49 |
+
.block-container {max-width: 1120px;}
|
| 50 |
+
</style>
|
| 51 |
+
""",
|
| 52 |
+
unsafe_allow_html=True,
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
# ------------ HERO ------------
|
| 56 |
+
st.markdown('<div class="hero">'
|
| 57 |
+
f'<img src="{LOGO_PATH}" alt="logo" />'
|
| 58 |
+
f'<h1>{COMPANY_NAME}</h1>' \
|
| 59 |
+
f'<p>{TAGLINE}</p>'
|
| 60 |
+
'</div>', unsafe_allow_html=True)
|
| 61 |
+
|
| 62 |
+
# ------------ GRID (2 CARDS) ------------
|
| 63 |
+
def app_card(app_dict):
|
| 64 |
+
return f"""
|
| 65 |
+
<div class=card>
|
| 66 |
+
<img class=thumb src="{app_dict['thumb']}" alt="{app_dict['title']}" />
|
| 67 |
+
<h3>{app_dict['title']}</h3>
|
| 68 |
+
<p>{app_dict['blurb']}</p>
|
| 69 |
+
<a class="btn btn-primary" href="{app_dict['url']}" target="_self">Open {app_dict['title']}</a>
|
| 70 |
+
</div>
|
| 71 |
+
"""
|
| 72 |
+
|
| 73 |
+
st.markdown(
|
| 74 |
+
f"<div class='grid'>{app_card(APP1)}{app_card(APP2)}</div>",
|
| 75 |
+
unsafe_allow_html=True,
|
| 76 |
+
)
|
| 77 |
+
|
| 78 |
+
# ------------ FOOTER (optional) ------------
|
| 79 |
+
st.markdown("\n\n<div style='text-align:center; color:#8a9099; font-size: 0.9rem;'>© {}</div>".format(COMPANY_NAME), unsafe_allow_html=True)
|
app1.png
ADDED
|
app2.png
ADDED
|
logo.png
ADDED
|
requirements.txt
CHANGED
|
@@ -1,3 +1 @@
|
|
| 1 |
-
|
| 2 |
-
pandas
|
| 3 |
-
streamlit
|
|
|
|
| 1 |
+
streamlit>=1.25
|
|
|
|
|
|