saq1b commited on
Commit
a203541
1 Parent(s): 7c3f277

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -258,6 +258,8 @@ Follow this example structure:
258
  except Exception as e:
259
  if "API key not valid" in str(e):
260
  raise gr.Error("Invalid API key. Please provide a valid Gemini API key.")
 
 
261
  else:
262
  raise gr.Error(f"Failed to generate podcast script: {e}")
263
 
 
258
  except Exception as e:
259
  if "API key not valid" in str(e):
260
  raise gr.Error("Invalid API key. Please provide a valid Gemini API key.")
261
+ elif "rate limit" in str(e).lower():
262
+ raise gr.Error("Rate limit exceeded for the API key. Please try again later or provide your own Gemini API key.")
263
  else:
264
  raise gr.Error(f"Failed to generate podcast script: {e}")
265