Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
import src.dependency # noqa
|
|
@@ -135,6 +138,12 @@ with demo:
|
|
| 135 |
show_copy_button=True,
|
| 136 |
)
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
if __name__ == "__main__":
|
| 139 |
# Launch demo
|
|
|
|
|
|
|
| 140 |
demo.queue().launch(ssr_mode=False)
|
|
|
|
| 1 |
+
import signal
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
import src.dependency # noqa
|
|
|
|
| 138 |
show_copy_button=True,
|
| 139 |
)
|
| 140 |
|
| 141 |
+
def handle_pdb(sig, frame):
|
| 142 |
+
import pdb
|
| 143 |
+
pdb.Pdb().set_trace(frame)
|
| 144 |
+
|
| 145 |
if __name__ == "__main__":
|
| 146 |
# Launch demo
|
| 147 |
+
signal.signal(signal.SIGUSR1, handle_pdb)
|
| 148 |
+
print(os.getpid())
|
| 149 |
demo.queue().launch(ssr_mode=False)
|