Commit ca4cddbe authored by Kavindu Randika's avatar Kavindu Randika

symptoms API

parent 03b7cf73
......@@ -14,12 +14,12 @@ def load_data_json(path=''):
fp.close()
return data
@prediction.get('/api/predictions/symptoms')
async def predict_symptoms():
@prediction.post('/api/predictions/symptoms')
async def predict_symptoms(symptoms: List[int]):
try:
data = load_data_json('../config/data.json')
data = load_data_json('./data.json')
threshold = 0.5
input = set([79,77])
input = set(symptoms)
output = []
for key in data.keys():
numbers = [int(i) for i in key.split(',') if int(i) != 0]
......
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