wang2226 commited on
Commit
83a4be4
·
verified ·
1 Parent(s): aba7ac7

Startup progress markers

Browse files
Files changed (1) hide show
  1. app.py +19 -9
app.py CHANGED
@@ -1,17 +1,27 @@
1
  """Beyond Tokens · Decoding Playground — contrastive, guided and parallel decoding, step by step."""
2
 
3
- import spaces # noqa: F401 (ZeroGPU: must be imported before torch)
4
 
5
- import json
6
- import logging
7
- import os
8
- import tempfile
9
- import time
10
- from pathlib import Path
11
 
12
- import gradio as gr
13
 
14
- import models
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s: %(message)s")
17
  logging.getLogger("httpx").setLevel(logging.WARNING)
 
1
  """Beyond Tokens · Decoding Playground — contrastive, guided and parallel decoding, step by step."""
2
 
3
+ import sys
4
 
5
+ print(f"[startup] python {sys.version.split()[0]}", flush=True) # progress markers: see where a stuck start hangs
 
 
 
 
 
6
 
7
+ import spaces # noqa: F401,E402 (ZeroGPU: must be imported before torch)
8
 
9
+ print("[startup] spaces imported", flush=True)
10
+
11
+ import json # noqa: E402
12
+ import logging # noqa: E402
13
+ import os # noqa: E402
14
+ import tempfile # noqa: E402
15
+ import time # noqa: E402
16
+ from pathlib import Path # noqa: E402
17
+
18
+ import gradio as gr # noqa: E402
19
+
20
+ print("[startup] gradio imported", flush=True)
21
+
22
+ import models # noqa: E402
23
+
24
+ print("[startup] torch and models module imported", flush=True)
25
 
26
  logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s: %(message)s")
27
  logging.getLogger("httpx").setLevel(logging.WARNING)