saq1b commited on
Commit
4e239ef
1 Parent(s): d0bb969

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -253,15 +253,7 @@ Follow this example structure:
253
  system_instruction=system_prompt
254
  )
255
 
256
- try:
257
- response = await model.generate_content_async(messages)
258
- except Exception as e:
259
- if "API key not valid" in str(e):
260
- gr.Error("Invalid API key. Please provide a valid Gemini API key.")
261
- raise ValueError("Invalid API key. Please provide a valid Gemini API key.")
262
- else:
263
- gr.Error(f"Failed to generate podcast script: {e}")
264
- raise e
265
 
266
  print(f"Generated podcast script:\n{response.text}")
267
 
 
253
  system_instruction=system_prompt
254
  )
255
 
256
+ response = await model.generate_content_async(messages)
 
 
 
 
 
 
 
 
257
 
258
  print(f"Generated podcast script:\n{response.text}")
259