File size: 5,545 Bytes
17cf727 81d944c 2e3fc87 8ea8317 2e3fc87 e3401b3 2e3fc87 e3401b3 2e3fc87 e3401b3 2e3fc87 88304cb 2e3fc87 2eca2a1 2e3fc87 d9e3ae2 4c8fbd9 b98dd07 d2060f7 dae86b0 d2060f7 dcce91d f9ff00b 4c8fbd9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
import gradio as gr
import os
css = """
:root {
--bg-primary: #0a0a0a;
--bg-secondary: #141414;
--bg-card: #1a1a1a;
--bg-hover: #252525;
--border-color: #2a2a2a;
--text-primary: #ffffff;
--text-secondary: #a0a0a0;
--accent-blue: #3b82f6;
--gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
/* Only change colors, not spacing */
.gradio-container {
background: var(--bg-primary) !important;
color: var(--text-primary) !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
/* Header styling */
.header-container {
text-align: center;
padding: 3rem 0 2rem;
background: var(--bg-primary);
}
.logo-wrapper {
display: flex;
justify-content: center;
align-items: center;
gap: 2rem;
margin-bottom: 2rem;
}
.logo-divider {
width: 1px;
height: 40px;
background: var(--border-color);
}
.main-title {
font-size: 2rem;
font-weight: 400;
margin-bottom: 0.5rem;
color: var(--text-primary);
}
.subtitle {
color: var(--text-secondary);
font-size: 1rem;
}
/* Input styling */
.gr-input, .gr-textarea, textarea, input[type="text"], input[type="number"] {
background: var(--bg-secondary) !important;
border: 1px solid var(--border-color) !important;
color: var(--text-primary) !important;
border-radius: 8px !important;
}
.gr-input:focus, .gr-textarea:focus, textarea:focus, input:focus {
border-color: var(--accent-blue) !important;
outline: none !important;
background: var(--bg-hover) !important;
}
/* Button styling */
.primary-btn, .gr-button-primary {
background: var(--gradient) !important;
color: white !important;
border: none !important;
border-radius: 8px !important;
font-weight: 600 !important;
transition: all 0.2s ease !important;
}
.primary-btn:hover, .gr-button-primary:hover {
transform: translateY(-1px) !important;
box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3) !important;
}
.secondary-btn {
background: transparent !important;
color: var(--accent-blue) !important;
border: 1px solid var(--accent-blue) !important;
border-radius: 8px !important;
transition: all 0.2s ease !important;
}
.secondary-btn:hover {
background: var(--accent-blue) !important;
color: white !important;
}
/* Tab styling */
button[role="tab"] {
background: transparent !important;
color: var(--text-secondary) !important;
border: none !important;
border-radius: 8px !important;
font-weight: 500 !important;
transition: all 0.2s ease !important;
}
button[role="tab"]:hover {
background: var(--bg-hover) !important;
color: var(--text-primary) !important;
}
button[role="tab"][aria-selected="true"] {
background: var(--accent-blue) !important;
color: white !important;
}
/* Card backgrounds */
.gr-group {
background: var(--bg-card) !important;
border: 1px solid var(--border-color) !important;
border-radius: 12px !important;
}
/* Slider styling */
input[type="range"]::-webkit-slider-track {
background: var(--bg-secondary) !important;
height: 6px !important;
border-radius: 3px !important;
border: 1px solid var(--border-color) !important;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none !important;
background: var(--accent-blue) !important;
width: 18px !important;
height: 18px !important;
border-radius: 50% !important;
cursor: pointer !important;
}
/* Info message */
.info-message {
background: rgba(59, 130, 246, 0.1);
border: 1px solid var(--accent-blue);
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
color: var(--text-primary);
}
/* Footer */
.footer {
text-align: center;
padding: 3rem 0 2rem;
margin-top: 4rem;
border-top: 1px solid var(--border-color);
color: var(--text-secondary) !important;
}
a{
color: var(--text-secondary) !important;
}
footer, #huggingface-space-header, huggingface-space-header { display: none !important; }
"""
token = os.environ["TOKEN"]
model=os.environ["MODEL"]
with gr.Blocks(fill_height=False,fill_width=False,css=css,js="""
() => {
document.title ='AskCyph™ Video Generation - Cypher Tech Inc.';
const link = document.querySelector("link[rel~='icon']") || document.createElement('link');
link.type = 'image/svg+xml';
link.rel = 'icon';
link.href = 'https://cms.cypherchat.app/uploads/favicon_8bc904ca6b.svg';
document.getElementsByTagName('head')[0].appendChild(link);
}
""",theme=gr.themes.Default(
primary_hue="blue",
neutral_hue="gray",
text_size="md"
).set(
body_background_fill="#0a0a0a",
body_background_fill_dark="#0a0a0a",
block_background_fill="#1a1a1a",
block_background_fill_dark="#1a1a1a"
)) as demo:
loaded_demo = gr.load(model, src="spaces", token=token)
demo.launch(show_api=False, show_error=False, quiet=True, debug=False) |