Spaces:
Runtime error
Runtime error
wakeup update
Browse files- embed_utils.py +1 -7
- main.py +1 -8
embed_utils.py
CHANGED
@@ -47,6 +47,7 @@ async def embed_wrapper(input_ds, temp_file):
|
|
47 |
|
48 |
|
49 |
def wake_up_endpoint():
|
|
|
50 |
if endpoint.status != 'running':
|
51 |
logger.info("Starting up TEI endpoint")
|
52 |
endpoint.resume().wait().fetch()
|
@@ -62,10 +63,3 @@ def wake_up_endpoint():
|
|
62 |
logger.info("TEI endpoint is up")
|
63 |
|
64 |
return
|
65 |
-
|
66 |
-
# endpoint.fetch()
|
67 |
-
# if endpoint.status != 'running':
|
68 |
-
# logger.info("Starting up TEI endpoint")
|
69 |
-
# endpoint.resume().wait()
|
70 |
-
# logger.info("TEI endpoint is up")
|
71 |
-
# return
|
|
|
47 |
|
48 |
|
49 |
def wake_up_endpoint():
|
50 |
+
endpoint.fetch()
|
51 |
if endpoint.status != 'running':
|
52 |
logger.info("Starting up TEI endpoint")
|
53 |
endpoint.resume().wait().fetch()
|
|
|
63 |
logger.info("TEI endpoint is up")
|
64 |
|
65 |
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main.py
CHANGED
@@ -109,11 +109,4 @@ def chunk_and_embed(input_ds_name):
|
|
109 |
chunked_tmp_file = chunk(input_ds_name)
|
110 |
embed(chunked_tmp_file)
|
111 |
|
112 |
-
return {"processed": True}
|
113 |
-
|
114 |
-
|
115 |
-
# For debugging
|
116 |
-
|
117 |
-
# import uvicorn
|
118 |
-
# if __name__ == "__main__":
|
119 |
-
# uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
109 |
chunked_tmp_file = chunk(input_ds_name)
|
110 |
embed(chunked_tmp_file)
|
111 |
|
112 |
+
return {"processed": True}
|
|
|
|
|
|
|
|
|
|
|
|
|
|