Spaces:
Runtime error
Runtime error
Updated Main File
Browse files
main.py
CHANGED
@@ -13,7 +13,7 @@ from media_download import YoutubeDownloader
|
|
13 |
# from summarizer import Extract_Summary, AudioBookNarration
|
14 |
# from audiobook import AudioBook
|
15 |
|
16 |
-
global MODELS
|
17 |
|
18 |
|
19 |
### API Configurations
|
@@ -24,10 +24,10 @@ async def lifespan(app: FastAPI):
|
|
24 |
|
25 |
## FastAPI Startup Code
|
26 |
|
27 |
-
# TODO
|
28 |
# Loading ML models
|
29 |
print('Loading ML Models..')
|
30 |
-
MODELS = load_models()
|
31 |
print('ML Models Loaded!')
|
32 |
|
33 |
yield
|
@@ -35,7 +35,7 @@ async def lifespan(app: FastAPI):
|
|
35 |
## FastAPI Shutdown Code
|
36 |
|
37 |
# Cleaning ML Models & Releasing the Resources
|
38 |
-
MODELS.clear()
|
39 |
|
40 |
# Initializing FastAPI App
|
41 |
app = FastAPI(lifespan=lifespan)
|
|
|
13 |
# from summarizer import Extract_Summary, AudioBookNarration
|
14 |
# from audiobook import AudioBook
|
15 |
|
16 |
+
# global MODELS
|
17 |
|
18 |
|
19 |
### API Configurations
|
|
|
24 |
|
25 |
## FastAPI Startup Code
|
26 |
|
27 |
+
# TODO - Commenting MODELS for now
|
28 |
# Loading ML models
|
29 |
print('Loading ML Models..')
|
30 |
+
# MODELS = load_models()
|
31 |
print('ML Models Loaded!')
|
32 |
|
33 |
yield
|
|
|
35 |
## FastAPI Shutdown Code
|
36 |
|
37 |
# Cleaning ML Models & Releasing the Resources
|
38 |
+
# MODELS.clear()
|
39 |
|
40 |
# Initializing FastAPI App
|
41 |
app = FastAPI(lifespan=lifespan)
|