new(all): Trainning project added.
This commit is contained in:
parent
278c8d8fa0
commit
217345a4fb
5 changed files with 56 additions and 10 deletions
|
|
@ -1,22 +1,22 @@
|
|||
import logging
|
||||
|
||||
import azure.functions as func
|
||||
|
||||
#set STORAGE_BLOB_URL='https://pythonazurestorage12345.blob.core.windows.net'
|
||||
|
||||
def main(req: func.HttpRequest) -> func.HttpResponse:
|
||||
# https://docs.microsoft.com/pt-br/azure/developer/python/azure-sdk-example-storage-use?tabs=cmd
|
||||
logging.info('Python HTTP trigger function processed a request.')
|
||||
|
||||
name = req.params.get('name')
|
||||
if not name:
|
||||
try:
|
||||
req_body = req.get_json()
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
name = req_body.get('name')
|
||||
age = req.params.get('age')
|
||||
income = req.params.get('income')
|
||||
employeeTime = req.params.get('employeeTime')
|
||||
|
||||
# Code here.
|
||||
|
||||
returnedTax = 1;
|
||||
|
||||
if name:
|
||||
return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
|
||||
return func.HttpResponse(returnedTax)
|
||||
else:
|
||||
return func.HttpResponse(
|
||||
"This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
|
||||
|
|
|
|||
17
EstimateLoanTaxTrain/__init__.py
Normal file
17
EstimateLoanTaxTrain/__init__.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import logging
|
||||
|
||||
import azure.functions as func
|
||||
|
||||
|
||||
def main(req: func.HttpRequest) -> func.HttpResponse:
|
||||
logging.info('Python HTTP trigger function processed a request.')
|
||||
|
||||
name = req.params.get('name')
|
||||
|
||||
if name:
|
||||
return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
|
||||
else:
|
||||
return func.HttpResponse(
|
||||
"This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
|
||||
status_code=200
|
||||
)
|
||||
20
EstimateLoanTaxTrain/function.json
Normal file
20
EstimateLoanTaxTrain/function.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"scriptFile": "__init__.py",
|
||||
"bindings": [
|
||||
{
|
||||
"authLevel": "anonymous",
|
||||
"type": "httpTrigger",
|
||||
"direction": "in",
|
||||
"name": "req",
|
||||
"methods": [
|
||||
"get",
|
||||
"post"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "http",
|
||||
"direction": "out",
|
||||
"name": "$return"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
EstimateLoanTaxTrain/sample.dat
Normal file
3
EstimateLoanTaxTrain/sample.dat
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"name": "Azure"
|
||||
}
|
||||
|
|
@ -3,3 +3,9 @@
|
|||
# Manually managing azure-functions-worker may cause unexpected issues
|
||||
|
||||
azure-functions
|
||||
azure-storage-blob
|
||||
azure-identity
|
||||
tensorflow
|
||||
scikit-learn
|
||||
pandas
|
||||
numpy
|
||||
Loading…
Add table
Reference in a new issue