bstraehle commited on
Commit
f2956bf
·
verified ·
1 Parent(s): 404c1fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -64,8 +64,10 @@ def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name =
64
  gr.Warning("Anthropic API Key is required.")
65
  return "", ""
66
 
67
- if not validate_input(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name):
68
- gr.Warning("Invalid input.")
 
 
69
  return "", ""
70
 
71
  if file_name:
 
64
  gr.Warning("Anthropic API Key is required.")
65
  return "", ""
66
 
67
+ is_valid, err_msg = validate_input(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name)
68
+
69
+ if not is_valid:
70
+ gr.Warning(f"Invalid input: {err_msg}")
71
  return "", ""
72
 
73
  if file_name: