Aditya Sahu
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ body, html, .gradio-container, #root, .main, .app, .gradio-interface, .gradio-bl
|
|
| 66 |
footer, .gradio-footer, .svelte-1ipelgc, .gradio-logo, .gradio-app__settings {
|
| 67 |
display: none !important;
|
| 68 |
}
|
| 69 |
-
.main-header { text-align: center; margin: 0 !important; color: #3b82f6 !important; font-weight: 600 !
|
| 70 |
.card { background: #fafafa !important; border-radius: 12px !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; border: 1px solid #e5e7eb !important; margin-bottom: 1.5rem !important; transition: all 0.2s ease-in-out !important; overflow: hidden !important; }
|
| 71 |
.card-header { background: linear-gradient(135deg, #1975cf 0%, #1557b0 100%) !important; color: white !important; padding: 1rem 1.5rem !important; border-radius: 12px 12px 0 0 !important; font-weight: 600 !important; font-size: 1.1rem !important; }
|
| 72 |
.card-content { padding: 1.5rem !important; color: #4b5563 !important; line-height: 1.6 !important; background: #fafafa !important; }
|
|
@@ -80,20 +80,32 @@ div[data-testid="markdown"] strong { color: #0056b3 !important; font-weight: bol
|
|
| 80 |
/* Dark theme compatibility */
|
| 81 |
.dark h1#main_title, .dark #main_title h1 {
|
| 82 |
color: #4dabf7 !important;
|
| 83 |
-
text-shadow:
|
|
|
|
|
|
|
| 84 |
}
|
| 85 |
.dark h3#subtitle, .dark #subtitle h3 {
|
| 86 |
color: #e9ecef !important;
|
| 87 |
-
text-shadow:
|
|
|
|
|
|
|
| 88 |
}
|
| 89 |
.dark #subtitle a {
|
| 90 |
color: #4dabf7 !important;
|
| 91 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
"""
|
| 93 |
|
| 94 |
with gr.Blocks(css=custom_css) as demo:
|
| 95 |
-
gr.Markdown("<h1 style='font-size:2.5em; color:#007dc3; margin-bottom:0; text-shadow:
|
| 96 |
-
gr.Markdown("<h3 style='margin-top:0; color
|
| 97 |
user_text = gr.Markdown("")
|
| 98 |
with gr.Row():
|
| 99 |
with gr.Column(scale=1):
|
|
@@ -103,7 +115,7 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 103 |
label="Select Model Type",
|
| 104 |
interactive=True
|
| 105 |
)
|
| 106 |
-
default_image = load_example_image("
|
| 107 |
input_image = gr.Image(
|
| 108 |
label="",
|
| 109 |
height=250,
|
|
|
|
| 66 |
footer, .gradio-footer, .svelte-1ipelgc, .gradio-logo, .gradio-app__settings {
|
| 67 |
display: none !important;
|
| 68 |
}
|
| 69 |
+
.main-header { text-align: center; margin: 0 !important; color: #3b82f6 !important; font-weight: 600 !important; font-size: 2.5rem; letter-spacing: -0.025em; }
|
| 70 |
.card { background: #fafafa !important; border-radius: 12px !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; border: 1px solid #e5e7eb !important; margin-bottom: 1.5rem !important; transition: all 0.2s ease-in-out !important; overflow: hidden !important; }
|
| 71 |
.card-header { background: linear-gradient(135deg, #1975cf 0%, #1557b0 100%) !important; color: white !important; padding: 1rem 1.5rem !important; border-radius: 12px 12px 0 0 !important; font-weight: 600 !important; font-size: 1.1rem !important; }
|
| 72 |
.card-content { padding: 1.5rem !important; color: #4b5563 !important; line-height: 1.6 !important; background: #fafafa !important; }
|
|
|
|
| 80 |
/* Dark theme compatibility */
|
| 81 |
.dark h1#main_title, .dark #main_title h1 {
|
| 82 |
color: #4dabf7 !important;
|
| 83 |
+
text-shadow: none !important;
|
| 84 |
+
border: none !important;
|
| 85 |
+
background-color: transparent !important;
|
| 86 |
}
|
| 87 |
.dark h3#subtitle, .dark #subtitle h3 {
|
| 88 |
color: #e9ecef !important;
|
| 89 |
+
text-shadow: none !important;
|
| 90 |
+
border: none !important;
|
| 91 |
+
background-color: transparent !important;
|
| 92 |
}
|
| 93 |
.dark #subtitle a {
|
| 94 |
color: #4dabf7 !important;
|
| 95 |
}
|
| 96 |
+
|
| 97 |
+
/* Remove borders from all elements */
|
| 98 |
+
[data-testid="markdown"] h1, [data-testid="markdown"] h2, [data-testid="markdown"] h3,
|
| 99 |
+
[data-testid="markdown"] h4, [data-testid="markdown"] h5, [data-testid="markdown"] h6,
|
| 100 |
+
[data-testid="markdown"] p, [data-testid="markdown"] span {
|
| 101 |
+
border: none !important;
|
| 102 |
+
box-shadow: none !important;
|
| 103 |
+
}
|
| 104 |
"""
|
| 105 |
|
| 106 |
with gr.Blocks(css=custom_css) as demo:
|
| 107 |
+
gr.Markdown("<h1 style='font-size:2.5em; color:#007dc3; margin-bottom:0; text-shadow: none; background-color: transparent; border: none;'>SR100 Vision Model Space</h1>", elem_id="main_title")
|
| 108 |
+
gr.Markdown("<h3 style='margin-top:0; color:#333; text-shadow: none; background-color: transparent; border: none;'>Vision models for Person Presence developed by Synaptics for specific to Astra SR100 MCU. Learn more at <a href='https://developer.synaptics.com/docs/sr/sr100/quick-start?utm_source=hf' target='_blank' style='color:#007dc3; text-decoration:underline;'>Synaptics AI Developer Zone</a></h3>", elem_id="subtitle")
|
| 109 |
user_text = gr.Markdown("")
|
| 110 |
with gr.Row():
|
| 111 |
with gr.Column(scale=1):
|
|
|
|
| 115 |
label="Select Model Type",
|
| 116 |
interactive=True
|
| 117 |
)
|
| 118 |
+
default_image = load_example_image("Group")
|
| 119 |
input_image = gr.Image(
|
| 120 |
label="",
|
| 121 |
height=250,
|