Spaces:
Running
Running
Update app.py
Browse files
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 |
|