bstraehle commited on
Commit
7cac1b6
·
verified ·
1 Parent(s): 8160da4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -63,7 +63,11 @@ def ask(question, openai_api_key, gemini_api_key, anthropic_api_key, file_name =
63
  if not anthropic_api_key:
64
  gr.Warning("Anthropic API Key is required.")
65
  return "", ""
66
-
 
 
 
 
67
  if file_name:
68
  file_name = f"files/{file_name}"
69
 
 
63
  if not anthropic_api_key:
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:
72
  file_name = f"files/{file_name}"
73