gradio_app: remove unused lines
Browse files- gradio_app.py +0 -10
gradio_app.py
CHANGED
@@ -109,16 +109,6 @@ print(f'[INFO] everything loaded!')
|
|
109 |
trainer = None
|
110 |
model = None
|
111 |
|
112 |
-
def reset_params(m):
|
113 |
-
|
114 |
-
@torch.no_grad()
|
115 |
-
def _reset(m: nn.Module):
|
116 |
-
reset_parameters = getattr(m, "reset_parameters", None)
|
117 |
-
if callable(reset_parameters):
|
118 |
-
m.reset_parameters()
|
119 |
-
|
120 |
-
model.apply(fn=_reset)
|
121 |
-
|
122 |
# define UI
|
123 |
|
124 |
with gr.Blocks(css=".gradio-container {max-width: 512px;}") as demo:
|
|
|
109 |
trainer = None
|
110 |
model = None
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
# define UI
|
113 |
|
114 |
with gr.Blocks(css=".gradio-container {max-width: 512px;}") as demo:
|