Emil25 commited on
Commit
430da8c
·
1 Parent(s): 1609c68

Update pages/Visualization.py

Browse files
Files changed (1) hide show
  1. pages/Visualization.py +4 -7
pages/Visualization.py CHANGED
@@ -16,13 +16,10 @@ def generate_img(payload):
16
  response = requests.post(API_URL_img, headers=headers, json=payload)
17
  body = response.json()
18
  if 'error' in body:
19
- if 'estimated_time' in body:
20
- time.sleep(body['estimated_time'])
21
- else:
22
- print(body)
23
- return
24
- generate_img(payload)
25
- return response.content
26
 
27
 
28
  st.markdown('# :female-student: Персональный помощник для студентов')
 
16
  response = requests.post(API_URL_img, headers=headers, json=payload)
17
  body = response.json()
18
  if 'error' in body:
19
+ time.sleep(3)
20
+ response = requests.post(API_URL_img, headers=headers, json=payload)
21
+ else:
22
+ return response.content
 
 
 
23
 
24
 
25
  st.markdown('# :female-student: Персональный помощник для студентов')