Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ def predict(query :str , chat_history : List[tuple[str,str]] , invocation_type :
|
|
| 11 |
try:
|
| 12 |
res = a.create_sql_agent(query,schemas)
|
| 13 |
except Exception as e:
|
| 14 |
-
return
|
| 15 |
elif invocation_type == "OIC":
|
| 16 |
try:
|
| 17 |
chat = ""
|
|
@@ -19,7 +19,7 @@ def predict(query :str , chat_history : List[tuple[str,str]] , invocation_type :
|
|
| 19 |
chat+= f"User: {user} Bot: {bot}\n\n"
|
| 20 |
res = a.search_from_db(query, chat)
|
| 21 |
except Exception as e:
|
| 22 |
-
return
|
| 23 |
return res
|
| 24 |
|
| 25 |
|
|
|
|
| 11 |
try:
|
| 12 |
res = a.create_sql_agent(query,schemas)
|
| 13 |
except Exception as e:
|
| 14 |
+
return "Due to limited compute, I am unable to answer at this moment. Please upgrade your deployment space."
|
| 15 |
elif invocation_type == "OIC":
|
| 16 |
try:
|
| 17 |
chat = ""
|
|
|
|
| 19 |
chat+= f"User: {user} Bot: {bot}\n\n"
|
| 20 |
res = a.search_from_db(query, chat)
|
| 21 |
except Exception as e:
|
| 22 |
+
return "Due to limited compute, I am unable to answer at this moment. Please upgrade your deployment space."
|
| 23 |
return res
|
| 24 |
|
| 25 |
|