Spaces:
Paused
Paused
Julian Bilcke commited on
Commit Β·
b36b370
1
Parent(s): ea331ab
up
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def SIGSEGV_signal_arises(signalNum, stack):
|
|
| 35 |
signal.signal(signal.SIGSEGV, SIGSEGV_signal_arises)
|
| 36 |
|
| 37 |
from loader import initialize_models
|
| 38 |
-
from engine import Engine, base64_data_uri_to_PIL_Image
|
| 39 |
|
| 40 |
# Global constants
|
| 41 |
DATA_ROOT = os.environ.get('DATA_ROOT', '/tmp/data')
|
|
@@ -143,9 +143,10 @@ async def initialize_app() -> web.Application:
|
|
| 143 |
"""Initialize and configure the web application."""
|
| 144 |
try:
|
| 145 |
logger.info("Initializing application...")
|
| 146 |
-
|
|
|
|
| 147 |
logger.info("π Creating Engine instance...")
|
| 148 |
-
engine =
|
| 149 |
logger.info("β
Engine instance created.")
|
| 150 |
|
| 151 |
app = web.Application()
|
|
|
|
| 35 |
signal.signal(signal.SIGSEGV, SIGSEGV_signal_arises)
|
| 36 |
|
| 37 |
from loader import initialize_models
|
| 38 |
+
from engine import Engine, base64_data_uri_to_PIL_Image
|
| 39 |
|
| 40 |
# Global constants
|
| 41 |
DATA_ROOT = os.environ.get('DATA_ROOT', '/tmp/data')
|
|
|
|
| 143 |
"""Initialize and configure the web application."""
|
| 144 |
try:
|
| 145 |
logger.info("Initializing application...")
|
| 146 |
+
live_portrait = await initialize_models()
|
| 147 |
+
|
| 148 |
logger.info("π Creating Engine instance...")
|
| 149 |
+
engine = Engine(live_portrait=live_portrait)
|
| 150 |
logger.info("β
Engine instance created.")
|
| 151 |
|
| 152 |
app = web.Application()
|