dimostzim commited on
Commit
16ec856
Β·
1 Parent(s): 0d03f00

Revert "Apply HelixDB-inspired visual theme"

Browse files

This reverts commit 0d03f0063edfa82e9eaf8eb5332ff97e86241ae4.

Files changed (1) hide show
  1. app.py +2 -146
app.py CHANGED
@@ -55,150 +55,6 @@ BATCH_SHAP_CACHE = {}
55
  MODEL_FILENAME = "pairwise_onehot_model_20260105_200141.pt"
56
  MODEL_REPO_ID = os.getenv("MIRBIND2_MODEL_REPO", "dimostzim/mirbind2-weights")
57
 
58
- # ============================================================================
59
- # HELIX-INSPIRED THEME & CSS
60
- # ============================================================================
61
-
62
- HELIX_THEME = gr.themes.Base(
63
- primary_hue="amber",
64
- neutral_hue="stone",
65
- font=[gr.themes.GoogleFont("Geist"), "ui-sans-serif", "system-ui", "sans-serif"],
66
- font_mono=["ui-monospace", "monospace"],
67
- )
68
-
69
- HELIX_CSS = """
70
- @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');
71
-
72
- /* ── Base: golden background with grid ───────────────────────────── */
73
- body, .gradio-container {
74
- background-color: #FBAF2F;
75
- background-image:
76
- linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
77
- linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
78
- background-size: 40px 40px;
79
- }
80
- .gradio-container {
81
- background-color: transparent !important;
82
- max-width: 1200px !important;
83
- }
84
-
85
- /* ── Typography ──────────────────────────────────────────────────── */
86
- .prose h1 {
87
- font-family: 'Playfair Display', serif !important;
88
- color: #1a1200 !important;
89
- font-size: 2rem !important;
90
- font-weight: 700 !important;
91
- letter-spacing: -0.01em !important;
92
- }
93
- .prose h2, .prose h3 {
94
- font-family: 'Playfair Display', serif !important;
95
- color: #1a1200 !important;
96
- }
97
- .prose p, .prose li, .prose strong, .prose em, .prose a {
98
- color: #1a1200 !important;
99
- }
100
- .prose a { text-decoration: underline !important; }
101
-
102
- /* Labels – uppercase tracked */
103
- label span, .label-wrap span {
104
- text-transform: uppercase !important;
105
- letter-spacing: 0.07em !important;
106
- font-size: 0.68rem !important;
107
- font-weight: 700 !important;
108
- color: #1a1200 !important;
109
- }
110
-
111
- /* ── Panels & Blocks ─────────────────────────────────────────────── */
112
- .block.padded, .panel {
113
- background-color: rgba(255, 252, 235, 0.93) !important;
114
- border: 1px solid rgba(26, 18, 0, 0.18) !important;
115
- border-radius: 2px !important;
116
- }
117
-
118
- /* ── Tabs ────────────────────────────────────────────────────────── */
119
- .tab-nav {
120
- border-bottom: 2px solid #1a1200 !important;
121
- background: transparent !important;
122
- }
123
- .tab-nav button {
124
- font-size: 0.68rem !important;
125
- text-transform: uppercase !important;
126
- letter-spacing: 0.1em !important;
127
- font-weight: 700 !important;
128
- color: #1a1200 !important;
129
- border-radius: 0 !important;
130
- background: rgba(255, 252, 235, 0.7) !important;
131
- border: none !important;
132
- }
133
- .tab-nav button.selected {
134
- background-color: #1a1200 !important;
135
- color: #FBAF2F !important;
136
- }
137
-
138
- /* ── Buttons ─────────────────────────────────────────────────────── */
139
- button.primary {
140
- background-color: #1a1200 !important;
141
- color: #FBAF2F !important;
142
- border: 2px solid #1a1200 !important;
143
- border-radius: 2px !important;
144
- text-transform: uppercase !important;
145
- letter-spacing: 0.08em !important;
146
- font-weight: 700 !important;
147
- transition: background-color 0.15s, color 0.15s !important;
148
- }
149
- button.primary:hover {
150
- background-color: #FBAF2F !important;
151
- color: #1a1200 !important;
152
- }
153
- button.secondary {
154
- background-color: transparent !important;
155
- color: #1a1200 !important;
156
- border: 2px solid #1a1200 !important;
157
- border-radius: 2px !important;
158
- text-transform: uppercase !important;
159
- letter-spacing: 0.08em !important;
160
- font-weight: 700 !important;
161
- }
162
-
163
- /* ── Inputs ──────────────────────────────────────────────────────── */
164
- textarea, input[type="text"], input[type="search"] {
165
- background-color: #ffffff !important;
166
- border: 1px solid rgba(26, 18, 0, 0.25) !important;
167
- border-radius: 2px !important;
168
- color: #1a1200 !important;
169
- }
170
- textarea:focus, input:focus {
171
- border-color: #1a1200 !important;
172
- box-shadow: 0 0 0 2px rgba(26, 18, 0, 0.12) !important;
173
- outline: none !important;
174
- }
175
-
176
- /* ── Checkbox ────────────────────────────────────────────────────── */
177
- input[type="checkbox"] { accent-color: #1a1200 !important; }
178
-
179
- /* ── Dataframe ───────────────────────────────────────────────────── */
180
- .dataframe th {
181
- background-color: #1a1200 !important;
182
- color: #FBAF2F !important;
183
- text-transform: uppercase !important;
184
- letter-spacing: 0.06em !important;
185
- font-size: 0.68rem !important;
186
- font-weight: 700 !important;
187
- padding: 8px 12px !important;
188
- }
189
- .dataframe td {
190
- color: #1a1200 !important;
191
- font-size: 0.82rem !important;
192
- border-bottom: 1px solid rgba(26, 18, 0, 0.1) !important;
193
- }
194
- .dataframe tr:hover td {
195
- background-color: rgba(251, 175, 47, 0.25) !important;
196
- }
197
-
198
- /* ── Hide Gradio footer ──────────────────────────────────────────── */
199
- footer { display: none !important; }
200
- """
201
-
202
 
203
  def resolve_model_path():
204
  """Resolve model path locally, or download from Hugging Face Hub if missing."""
@@ -1050,7 +906,7 @@ def process_uploaded_file(file, compute_shap):
1050
  def create_gradio_interface():
1051
  """Create the Gradio web interface with tabs."""
1052
 
1053
- with gr.Blocks(title="miRBind2: miRNA-mRNA Binding Predictor", css=HELIX_CSS) as app:
1054
  gr.Markdown("""
1055
  # miRBind2: miRNA-mRNA Binding Site Predictor
1056
 
@@ -1238,7 +1094,7 @@ def main():
1238
  server_name="0.0.0.0", # Required for containerized hosting (HF Spaces)
1239
  server_port=7860,
1240
  show_error=True,
1241
- theme=HELIX_THEME
1242
  )
1243
 
1244
 
 
55
  MODEL_FILENAME = "pairwise_onehot_model_20260105_200141.pt"
56
  MODEL_REPO_ID = os.getenv("MIRBIND2_MODEL_REPO", "dimostzim/mirbind2-weights")
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  def resolve_model_path():
60
  """Resolve model path locally, or download from Hugging Face Hub if missing."""
 
906
  def create_gradio_interface():
907
  """Create the Gradio web interface with tabs."""
908
 
909
+ with gr.Blocks(title="miRBind2: miRNA-mRNA Binding Predictor") as app:
910
  gr.Markdown("""
911
  # miRBind2: miRNA-mRNA Binding Site Predictor
912
 
 
1094
  server_name="0.0.0.0", # Required for containerized hosting (HF Spaces)
1095
  server_port=7860,
1096
  show_error=True,
1097
+ theme=gr.themes.Soft()
1098
  )
1099
 
1100