milwright commited on
Commit
d67177b
·
1 Parent(s): 37563ca

fix: add requests import and handle json display in preview

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,6 +8,7 @@ import json
8
  import zipfile
9
  import io
10
  import os
 
11
  from datetime import datetime
12
  from dotenv import load_dotenv
13
  from pathlib import Path
@@ -482,9 +483,10 @@ class SpaceGenerator:
482
 
483
  # Configuration accordion
484
  with gr.Accordion("ℹ️ Configuration", open=False):
 
485
  gr.JSON(
486
- value=config,
487
- label="config.json",
488
  show_label=True
489
  )
490
 
 
8
  import zipfile
9
  import io
10
  import os
11
+ import requests
12
  from datetime import datetime
13
  from dotenv import load_dotenv
14
  from pathlib import Path
 
483
 
484
  # Configuration accordion
485
  with gr.Accordion("ℹ️ Configuration", open=False):
486
+ config_display = {k: v for k, v in config.items() if k != 'preview_ready'}
487
  gr.JSON(
488
+ value=config_display,
489
+ label="Active Configuration",
490
  show_label=True
491
  )
492