Spaces:
Sleeping
Sleeping
Upload infer_serverless.py
Browse files- infer_serverless.py +2 -8
infer_serverless.py
CHANGED
@@ -37,8 +37,6 @@ import boto3
|
|
37 |
|
38 |
|
39 |
|
40 |
-
app = Flask(__name__)
|
41 |
-
app.secret_key = 'smjain_6789'
|
42 |
now_dir = os.getcwd()
|
43 |
cpt={}
|
44 |
tmp = os.path.join(now_dir, "TEMP")
|
@@ -56,10 +54,6 @@ request_semaphore = Semaphore(MAX_CONCURRENT_REQUESTS)
|
|
56 |
task_status_tracker = {}
|
57 |
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1" # ONLY FOR TESTING, REMOVE IN PRODUCTION
|
58 |
os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = "1"
|
59 |
-
app.config["GOOGLE_OAUTH_CLIENT_ID"] = "144930881143-n3e3ubers3vkq7jc9doe4iirasgimdt2.apps.googleusercontent.com"
|
60 |
-
app.config["GOOGLE_OAUTH_CLIENT_SECRET"] = "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"
|
61 |
-
google_blueprint = make_google_blueprint(scope=["profile", "email"])
|
62 |
-
app.register_blueprint(google_blueprint, url_prefix="/login")
|
63 |
ACCESS_ID = os.getenv('ACCESS_ID', '')
|
64 |
SECRET_KEY = os.getenv('SECRET_KEY', '')
|
65 |
|
@@ -675,5 +669,5 @@ def handler(job):
|
|
675 |
# Add your custom code here.
|
676 |
return "Your job results"
|
677 |
|
678 |
-
|
679 |
-
|
|
|
37 |
|
38 |
|
39 |
|
|
|
|
|
40 |
now_dir = os.getcwd()
|
41 |
cpt={}
|
42 |
tmp = os.path.join(now_dir, "TEMP")
|
|
|
54 |
task_status_tracker = {}
|
55 |
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1" # ONLY FOR TESTING, REMOVE IN PRODUCTION
|
56 |
os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = "1"
|
|
|
|
|
|
|
|
|
57 |
ACCESS_ID = os.getenv('ACCESS_ID', '')
|
58 |
SECRET_KEY = os.getenv('SECRET_KEY', '')
|
59 |
|
|
|
669 |
# Add your custom code here.
|
670 |
return "Your job results"
|
671 |
|
672 |
+
|
673 |
+
runpod.serverless.start({"handler": handler}) # Required.
|