import requests
import time
import random

for i in range(50):
    params = {'flat_id': i}
    data = {
        "geo_lat":	51.3153190612793,
        "geo_lon":	      37.920509338378906,
        "region":	5952,
        "building_type":	3,
        "level":	random.randint(1,20),
        "levels":	9,
        "rooms":	2,
        "area":	random.uniform(10, 200),
        "kitchen_area":	10,
        "object_type":	1,
        "floor_level":	      "mid"
        } 
    response = requests.post('http://price-predict:8000/api/prediction', params=params, json=data)
    time.sleep(random.randint(1,5))
    print(response.json())