cogcorp commited on
Commit
e1ed2b1
·
1 Parent(s): 7fdacf4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -42,9 +42,8 @@ def call_openai_api(user_prompt):
42
  {"role": "user", "content": f"{text}\n\n{user_prompt}"},
43
  ],
44
  )
45
- ai_response = response.choices[0].message['content']
46
 
47
-
48
  except Exception as e:
49
  if attempt < max_retries - 1: # if it's not the last attempt
50
  time.sleep(1) # wait for 1 seconds before retrying
 
42
  {"role": "user", "content": f"{text}\n\n{user_prompt}"},
43
  ],
44
  )
45
+ response.choices[0].message['content']
46
 
 
47
  except Exception as e:
48
  if attempt < max_retries - 1: # if it's not the last attempt
49
  time.sleep(1) # wait for 1 seconds before retrying