Commit 5817bc1b authored by shreyansh's avatar shreyansh

heroku app added

parent ab943105
......@@ -6,20 +6,7 @@ RUN echo "source activate $(head -1 /tmp/Softlab.yml | cut -d' ' -f2)" > ~/.bash
ENV PATH /opt/conda/envs/$(head -1 /tmp/Softlab.yml | cut -d' ' -f2)/bin:$PATH
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
# RUN conda config --set ssl_verify no && \
# conda create --name Softlab -y python=3.7.4 && \
# conda activate Softlab && \
# pip install starlette=0.12.10 uvicorn=0.9.1 google-auth=1.6.3 nltk=3.4.5 tensorflow=2.0.0 gensim=3.8.1
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 8765
EXPOSE 8000
CMD [ "python3", "main.py" ]
\ No newline at end of file
web: python3 main.py
\ No newline at end of file
......@@ -18,6 +18,24 @@ credentials = service_account.Credentials.from_service_account_file("./serviceKe
authed_session = AuthorizedSession(credentials)
@app.route('/register',methods=["POST"])
async def registration(request):
body = await request.json()
email, password = body['email'],body['password']
json = {
"email": email,
"password": password,
"returnSecureToken": True
}
message = "Success, Thanks for your envaluable contribution!"
response = authed_session.post("https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser",None,json)
print(response)
if response.status_code!=200:
message = "Oops some error occured please try after some time."
return PlainTextResponse(message)
@app.route('/')
async def homepage(request):
return templates.TemplateResponse('index.html', {'request': request})
......
absl-py==0.8.1
astor==0.8.0
boto==2.49.0
boto3==1.10.4
botocore==1.13.4
cachetools==3.1.1
chardet==3.0.4
click==7.0
docutils==0.15.2
gast==0.2.2
gensim==3.8.1
google-auth==1.6.3
google-pasta==0.1.7
grpcio==1.24.3
h11==0.8.1
h5py==2.10.0
httptools==0.0.13
idna==2.8
jinja2==2.10.3
jmespath==0.9.4
keras-applications==1.0.8
keras-preprocessing==1.1.0
markdown==3.1.1
markupsafe==1.1.1
nltk==3.4.5
numpy==1.17.3
opt-einsum==3.1.0
protobuf==3.10.0
pyasn1==0.4.7
pyasn1-modules==0.2.7
python-dateutil==2.8.0
python-multipart==0.0.5
requests==2.22.0
rsa==4.0
s3transfer==0.2.1
scipy==1.3.1
six==1.12.0
smart-open==1.8.4
starlette==0.12.10
tensorboard==2.0.0
tensorflow==2.0.0
tensorflow-estimator==2.0.1
termcolor==1.1.0
urllib3==1.25.6
uvicorn==0.9.1
uvloop==0.13.0
websockets==8.0.2
werkzeug==0.16.0
wrapt==1.11.2
\ No newline at end of file
python-3.7.4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment