Commit 68c671f97354f11fa56fba139462a1ba16966908

Authored by Rahul Thakkar
0 parents
Exists in master and in 1 other branch developer

this is a test

Showing 2 changed files with 155 additions and 0 deletions   Show diff stats
example/main.py 0 → 100644
  1 +++ a/example/main.py
@@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
  1 +from __future__ import absolute_import
  2 +from __future__ import division
  3 +from __future__ import print_function
  4 +import json
  5 +import numpy as np
  6 +import pandas as pd
  7 +import os
  8 +import glob
  9 +import sys
  10 +from time import time
  11 +from flask import Flask, request, jsonify
  12 +import tensorflow as tf
  13 +from pycld2 import detect
  14 +from polyglot.detect import Detector
  15 +import logging
  16 +import datetime
  17 +from logging.handlers import TimedRotatingFileHandler
  18 +import pickle
  19 +
  20 +app = Flask(__name__)
  21 +
  22 +@app.route("/",methods=["GET"])
  23 +def index():
  24 + return("App is running")
  25 +
  26 +@app.route("/patient", methods=["POST"])
  27 +def patient():
  28 + try:
  29 + name = request.form['name']
  30 + age = request.form['age']
  31 + gender = request.form['gender']
  32 + illness = request.form['illness']
  33 +
  34 + except Exception as e:
  35 + return "unable to create patient, error:", str(e)
  36 +
  37 + return jsonify({"name":name, "age":age, "gender":gender, "illness":illness})
  38 +
  39 +@app.route("/doctor", methods=["POST"])
  40 +def doctor():
  41 +
  42 + try:
  43 + if 'diagnoses' in request.files:
  44 + diagnoses = request.files['diagnoses']
  45 + print('one')
  46 + file_name = os.path.join("/home/raj/deep_evn/example", diagnoses.filename)
  47 + print(file_name)
  48 + diagnoses.save(file_name)
  49 + print('three')
  50 +
  51 +
  52 + medicine = request.form.get('medicine', "Not required")
  53 +
  54 + except Exception as e:
  55 + return "Unable to upload model file!, error:", str(e)
  56 +
  57 + return jsonify({"medicine":medicine, "file":file_name})
  58 +
  59 +
  60 +if __name__ == '__main__':
  61 + app.run(debug=False, host= "0.0.0.0",port = 2542, use_reloader=False)
example/req 0 → 100644
  1 +++ a/example/req
@@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
  1 +absl-py==0.7.1
  2 +astor==0.7.1
  3 +attrs==19.1.0
  4 +backcall==0.1.0
  5 +beautifulsoup4==4.7.1
  6 +bleach==3.1.0
  7 +bs4==0.0.1
  8 +certifi==2019.3.9
  9 +chardet==3.0.4
  10 +colorama==0.4.1
  11 +cycler==0.10.0
  12 +decorator==4.4.0
  13 +defusedxml==0.6.0
  14 +ekphrasis==0.5.1
  15 +entrypoints==0.3
  16 +ftfy==5.5.1
  17 +gast==0.2.2
  18 +grpcio==1.20.0
  19 +h5py==2.9.0
  20 +idna==2.8
  21 +ipykernel==5.1.0
  22 +ipyparallel==6.2.3
  23 +ipython==7.4.0
  24 +ipython-genutils==0.2.0
  25 +ipywidgets==7.4.2
  26 +jedi==0.13.3
  27 +Jinja2==2.10.1
  28 +jsonschema==3.0.1
  29 +jupyter-client==5.2.4
  30 +jupyter-contrib-core==0.3.3
  31 +jupyter-contrib-nbextensions==0.5.1
  32 +jupyter-core==4.4.0
  33 +jupyter-highlight-selected-word==0.2.0
  34 +jupyter-latex-envs==1.4.6
  35 +jupyter-nbextensions-configurator==0.4.1
  36 +Keras==2.2.4
  37 +Keras-Applications==1.0.7
  38 +Keras-Preprocessing==1.0.9
  39 +kiwisolver==1.0.1
  40 +lxml==4.3.3
  41 +Markdown==3.1
  42 +MarkupSafe==1.1.1
  43 +matplotlib==3.0.3
  44 +mistune==0.8.4
  45 +mock==2.0.0
  46 +nbconvert==5.4.1
  47 +nbformat==4.4.0
  48 +nltk==3.4.1
  49 +notebook==5.7.8
  50 +numpy==1.16.3
  51 +pandas==0.24.2
  52 +pandocfilters==1.4.2
  53 +parso==0.4.0
  54 +pbr==5.1.3
  55 +pexpect==4.7.0
  56 +pickleshare==0.7.5
  57 +plotly==3.8.1
  58 +prometheus-client==0.6.0
  59 +prompt-toolkit==2.0.9
  60 +protobuf==3.7.1
  61 +ptyprocess==0.6.0
  62 +Pygments==2.3.1
  63 +pymssql==2.1.4
  64 +pyparsing==2.4.0
  65 +pyrsistent==0.14.11
  66 +python-dateutil==2.8.0
  67 +pytz==2019.1
  68 +PyYAML==5.1
  69 +pyzmq==18.0.1
  70 +requests==2.21.0
  71 +retrying==1.3.3
  72 +scikit-learn==0.20.3
  73 +scipy==1.2.1
  74 +seaborn==0.9.0
  75 +Send2Trash==1.5.0
  76 +six==1.12.0
  77 +sklearn==0.0
  78 +soupsieve==1.9.1
  79 +tensorboard==1.13.1
  80 +tensorflow==1.13.1
  81 +tensorflow-estimator==1.13.0
  82 +termcolor==1.1.0
  83 +terminado==0.8.2
  84 +testpath==0.4.2
  85 +tornado==6.0.2
  86 +tqdm==4.31.1
  87 +traitlets==4.3.2
  88 +ujson==1.35
  89 +urllib3==1.24.2
  90 +wcwidth==0.1.7
  91 +webencodings==0.5.1
  92 +Werkzeug==0.15.2
  93 +xlrd==1.2.0
  94 +widgetsnbextension==3.4.2