Rooni commited on
Commit
bf8c42d
·
verified ·
1 Parent(s): efc78a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -28,11 +28,9 @@ def generate(forr, ver=15, doptb=""):
28
 
29
  try:
30
  response = requests.post(os.getenv("BASE_URL"), headers=headers, json=payload, timeout=250)
31
- # response.raise_for_status()
32
  data = response.json()
33
 
34
- return response
35
-
36
  # Улучшенная обработка ответа
37
  if not isinstance(data, dict):
38
  return "Некорректный формат ответа от сервера."
 
28
 
29
  try:
30
  response = requests.post(os.getenv("BASE_URL"), headers=headers, json=payload, timeout=250)
31
+ response.raise_for_status()
32
  data = response.json()
33
 
 
 
34
  # Улучшенная обработка ответа
35
  if not isinstance(data, dict):
36
  return "Некорректный формат ответа от сервера."