Spaces:
Running
Running
inoki-giskard
commited on
Commit
·
92dfaaf
1
Parent(s):
5559b52
Add log files
Browse files- app_debug.py +15 -3
app_debug.py
CHANGED
@@ -46,6 +46,15 @@ def get_config_files():
|
|
46 |
]
|
47 |
return config_files
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
def get_jobs_info_in_queue():
|
50 |
return [f"⌛️job id {html.escape(job[0])}: {html.escape(job[2])}<br/>" for job in pipe.jobs]
|
51 |
|
@@ -63,8 +72,11 @@ def get_demo():
|
|
63 |
every=5,
|
64 |
)
|
65 |
with gr.Accordion(label="Log Files", open=False):
|
66 |
-
gr.
|
67 |
-
value=
|
68 |
-
)
|
|
|
|
|
|
|
69 |
with gr.Accordion(label="Config Files", open=False):
|
70 |
gr.Files(value=get_config_files, label="Config Files", every=10)
|
|
|
46 |
]
|
47 |
return config_files
|
48 |
|
49 |
+
|
50 |
+
def get_log_files():
|
51 |
+
return [
|
52 |
+
join(LOG_PATH, f)
|
53 |
+
for f in listdir(LOG_PATH)
|
54 |
+
if isfile(join(LOG_PATH, f)) and f.endswith("_log")
|
55 |
+
]
|
56 |
+
|
57 |
+
|
58 |
def get_jobs_info_in_queue():
|
59 |
return [f"⌛️job id {html.escape(job[0])}: {html.escape(job[2])}<br/>" for job in pipe.jobs]
|
60 |
|
|
|
72 |
every=5,
|
73 |
)
|
74 |
with gr.Accordion(label="Log Files", open=False):
|
75 |
+
with gr.Row():
|
76 |
+
gr.Files(value=get_log_files, label="Log Files", every=10)
|
77 |
+
with gr.Row():
|
78 |
+
gr.Textbox(
|
79 |
+
value=get_logs_file, every=0.5, lines=10, visible=True, label="Current Log File"
|
80 |
+
)
|
81 |
with gr.Accordion(label="Config Files", open=False):
|
82 |
gr.Files(value=get_config_files, label="Config Files", every=10)
|