Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1752,6 +1752,8 @@ def handle_save_trustbuilder(content, specified_bucket=None):
|
|
| 1752 |
|
| 1753 |
# Update last processed content
|
| 1754 |
st.session_state["last_processed_content"] = content
|
|
|
|
|
|
|
| 1755 |
|
| 1756 |
# Generate response
|
| 1757 |
|
|
@@ -1873,8 +1875,7 @@ def handle_prompt(prompt):
|
|
| 1873 |
specified_bucket = bucket_match.group(1).capitalize()
|
| 1874 |
|
| 1875 |
if content_to_save:
|
| 1876 |
-
|
| 1877 |
-
else:
|
| 1878 |
# If content is not provided after the command, extract from prompt
|
| 1879 |
content_to_save = re.sub(r"\b(save|add|keep|store)\s+(this)?\s*(as)?\s*(\w+\s*trustbuilder|trustbuilder)\b", "", prompt, flags=re.IGNORECASE).strip()
|
| 1880 |
if content_to_save:
|
|
|
|
| 1752 |
|
| 1753 |
# Update last processed content
|
| 1754 |
st.session_state["last_processed_content"] = content
|
| 1755 |
+
return f"TrustBuilder allocated to **{bucket}** and saved successfully!"
|
| 1756 |
+
|
| 1757 |
|
| 1758 |
# Generate response
|
| 1759 |
|
|
|
|
| 1875 |
specified_bucket = bucket_match.group(1).capitalize()
|
| 1876 |
|
| 1877 |
if content_to_save:
|
| 1878 |
+
|
|
|
|
| 1879 |
# If content is not provided after the command, extract from prompt
|
| 1880 |
content_to_save = re.sub(r"\b(save|add|keep|store)\s+(this)?\s*(as)?\s*(\w+\s*trustbuilder|trustbuilder)\b", "", prompt, flags=re.IGNORECASE).strip()
|
| 1881 |
if content_to_save:
|