Wauplin HF staff commited on
Commit
e987d7b
1 Parent(s): 06bc848

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  import os
2
  from pathlib import Path
3
 
@@ -6,11 +12,6 @@ import gradio as gr
6
  from app_1M_image import get_demo as get_demo_1M_image
7
  from app_image import get_demo as get_demo_image
8
  from app_json import get_demo as get_demo_json
9
- from huggingface_hub import logging, login
10
-
11
- login(token=os.environ.get("HF_TOKEN"), write_permission=True)
12
- logging.set_verbosity_debug()
13
-
14
 
15
  def _get_demo_code(path: str) -> str:
16
  code = Path(path).read_text()
 
1
+ # Start by setting token and debug mode before starting schedulers
2
+ from huggingface_hub import logging, login
3
+ login(token=os.environ.get("HF_TOKEN"), write_permission=True)
4
+ logging.set_verbosity_debug()
5
+
6
+ # Start apps
7
  import os
8
  from pathlib import Path
9
 
 
12
  from app_1M_image import get_demo as get_demo_1M_image
13
  from app_image import get_demo as get_demo_image
14
  from app_json import get_demo as get_demo_json
 
 
 
 
 
15
 
16
  def _get_demo_code(path: str) -> str:
17
  code = Path(path).read_text()