Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,8 @@ class GeneratorWrapper:
|
|
20 |
self.reload()
|
21 |
|
22 |
def generate(self, *args, **kwargs):
|
|
|
|
|
23 |
return self.generator.generate(*args, **kwargs)
|
24 |
|
25 |
def to(self, device):
|
|
|
20 |
self.reload()
|
21 |
|
22 |
def generate(self, *args, **kwargs):
|
23 |
+
if not hasattr(self, "generator"):
|
24 |
+
self.reload()
|
25 |
return self.generator.generate(*args, **kwargs)
|
26 |
|
27 |
def to(self, device):
|