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