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