Spaces:
Paused
Paused
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
# Organization details
|
| 5 |
+
ORG_NAME = "Your Organization Name"
|
| 6 |
+
DESCRIPTION = """
|
| 7 |
+
Your organization's detailed description goes here. You can include information about:
|
| 8 |
+
- Your mission and goals
|
| 9 |
+
- Areas of focus
|
| 10 |
+
- Notable projects or achievements
|
| 11 |
+
- Contact information
|
| 12 |
+
"""
|
| 13 |
+
LOGO_PATH = "path_to_your_logo.png" # Add your logo file to the repository
|
| 14 |
+
THEME_COLOR = "#ff7f50" # Customize the theme color
|
| 15 |
+
|
| 16 |
+
# Create custom CSS for styling
|
| 17 |
+
custom_css = """
|
| 18 |
+
.org-card {
|
| 19 |
+
border-radius: 15px;
|
| 20 |
+
padding: 20px;
|
| 21 |
+
background: white;
|
| 22 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 23 |
+
}
|
| 24 |
+
.org-title {
|
| 25 |
+
font-size: 24px;
|
| 26 |
+
font-weight: bold;
|
| 27 |
+
margin-bottom: 15px;
|
| 28 |
+
color: var(--theme-color);
|
| 29 |
+
}
|
| 30 |
+
.org-description {
|
| 31 |
+
font-size: 16px;
|
| 32 |
+
line-height: 1.6;
|
| 33 |
+
color: #333;
|
| 34 |
+
}
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
def create_organization_card():
|
| 38 |
+
"""
|
| 39 |
+
Creates and returns the organization card interface
|
| 40 |
+
"""
|
| 41 |
+
with gr.Blocks(css=custom_css) as interface:
|
| 42 |
+
with gr.Column(elem_classes="org-card"):
|
| 43 |
+
if os.path.exists(LOGO_PATH):
|
| 44 |
+
gr.Image(value=LOGO_PATH, shape=(200, 200), show_label=False)
|
| 45 |
+
|
| 46 |
+
gr.Markdown(f"<div class='org-title'>{ORG_NAME}</div>", show_label=False)
|
| 47 |
+
gr.Markdown(DESCRIPTION, elem_classes="org-description", show_label=False)
|
| 48 |
+
|
| 49 |
+
with gr.Row():
|
| 50 |
+
gr.Button("Visit Website", link="https://your-website.com")
|
| 51 |
+
gr.Button("GitHub", link="https://github.com/your-organization")
|
| 52 |
+
gr.Button("Twitter", link="https://twitter.com/your-handle")
|
| 53 |
+
|
| 54 |
+
return interface
|
| 55 |
+
|
| 56 |
+
# Create and launch the interface
|
| 57 |
+
demo = create_organization_card()
|
| 58 |
+
|
| 59 |
+
# Launch the app
|
| 60 |
+
if __name__ == "__main__":
|
| 61 |
+
demo.launch()
|