Родитель
f01e753aa2
Сommit
82eaaf221f
@ -0,0 +1,15 @@
|
||||
name: lec_app
|
||||
|
||||
services:
|
||||
price-predict:
|
||||
image: estate_model:0
|
||||
ports:
|
||||
- "8001:8000"
|
||||
volumes:
|
||||
- ./models:/models
|
||||
|
||||
|
||||
requests:
|
||||
image: test_requests:2
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install requests
|
||||
|
||||
CMD ["python3", "req.py"]
|
||||
|
||||
# docker build . --tag test_requests:0
|
||||
# docker run test_requests:0
|
@ -0,0 +1,23 @@
|
||||
import requests
|
||||
import time
|
||||
import random
|
||||
|
||||
time.sleep(3)
|
||||
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://localhost:8000/api/prediction', params=params, json=data)
|
||||
time.sleep(4)
|
||||
print(response.json())
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче