Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -30,21 +30,6 @@ app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
30 |
os.environ["GRADIO_ALLOWED_PATHS"] = str(static_dir.resolve())
|
31 |
|
32 |
|
33 |
-
#token = _get_token(Request)
|
34 |
-
#payload = token.split('.')[1]
|
35 |
-
#payload = f"{payload}{'=' * ((4 - len(payload) % 4) % 4)}"
|
36 |
-
#payload = json.loads(base64.urlsafe_b64decode(payload).decode())
|
37 |
-
#print(f"Token payload outside of function: {payload}") # For debugging
|
38 |
-
|
39 |
-
|
40 |
-
@spaces.GPU(1) # Specify GPU duration in seconds, added for testing
|
41 |
-
def init_gpu(text):
|
42 |
-
"""Example GPU function - in reality, this might be model inference"""
|
43 |
-
time.sleep(10)
|
44 |
-
|
45 |
-
init_gpu()
|
46 |
-
|
47 |
-
|
48 |
@spaces.GPU(duration=4*60) # Specify GPU duration in seconds, added for testing
|
49 |
def process_text(text):
|
50 |
"""Example GPU function - in reality, this might be model inference"""
|
|
|
30 |
os.environ["GRADIO_ALLOWED_PATHS"] = str(static_dir.resolve())
|
31 |
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
@spaces.GPU(duration=4*60) # Specify GPU duration in seconds, added for testing
|
34 |
def process_text(text):
|
35 |
"""Example GPU function - in reality, this might be model inference"""
|