slenk commited on
Commit
32a86b6
·
verified ·
1 Parent(s): d35987b

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +0 -60
app.py CHANGED
@@ -249,68 +249,8 @@ def render_mermaid_images(spec: str) -> str:
249
 
250
 
251
  def create_app():
252
- mermaid_css = """
253
- /* Aggressive mermaid text fix — target all SVG text elements */
254
- svg[id^="mermaid"] text,
255
- svg[id^="mermaid"] tspan,
256
- svg[id^="mermaid"] .nodeLabel,
257
- svg[id^="mermaid"] .edgeLabel,
258
- svg[id^="mermaid"] .label,
259
- svg[id^="mermaid"] .cluster-label,
260
- .mermaid text,
261
- .mermaid tspan,
262
- .mermaid .nodeLabel,
263
- .mermaid .edgeLabel,
264
- .mermaid .label,
265
- [data-mermaid] text,
266
- [data-mermaid] tspan {
267
- color: #1a1a1a !important;
268
- fill: #1a1a1a !important;
269
- }
270
- svg[id^="mermaid"] .node rect,
271
- svg[id^="mermaid"] .node polygon,
272
- svg[id^="mermaid"] .node circle,
273
- .mermaid .node rect,
274
- .mermaid .node polygon,
275
- .mermaid .node circle {
276
- fill: #e8f0fe !important;
277
- stroke: #4a6fa5 !important;
278
- }
279
- svg[id^="mermaid"] .edgePath .path,
280
- .mermaid .edgePath .path {
281
- stroke: #4a6fa5 !important;
282
- }
283
- svg[id^="mermaid"] .cluster rect,
284
- .mermaid .cluster rect {
285
- fill: #f0f4ff !important;
286
- stroke: #4a6fa5 !important;
287
- }
288
- """
289
-
290
- mermaid_js = """
291
- () => {
292
- if (window.mermaid) {
293
- window.mermaid.initialize({
294
- theme: 'default',
295
- themeVariables: {
296
- primaryColor: '#e8f0fe',
297
- primaryTextColor: '#1a1a1a',
298
- primaryBorderColor: '#4a6fa5',
299
- lineColor: '#4a6fa5',
300
- secondaryColor: '#f0f4ff',
301
- tertiaryColor: '#fff',
302
- nodeTextColor: '#1a1a1a',
303
- edgeLabelBackground: '#ffffff',
304
- }
305
- });
306
- }
307
- }
308
- """
309
-
310
  with gr.Blocks(
311
  title="CodeWraith - Module-to-Spec Transformer",
312
- css=mermaid_css,
313
- js=mermaid_js,
314
  ) as app:
315
  gr.Markdown(
316
  "# CodeWraith\n"
 
249
 
250
 
251
  def create_app():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  with gr.Blocks(
253
  title="CodeWraith - Module-to-Spec Transformer",
 
 
254
  ) as app:
255
  gr.Markdown(
256
  "# CodeWraith\n"