Spaces:
Paused
Paused
Fix indentation errors - use consistent 4-space indentation
Browse files
app.py
CHANGED
|
@@ -95,10 +95,10 @@ def app_handle(email_text): # frontend wrapper - keep syncronous
|
|
| 95 |
formatted_text = format_response_text(result)
|
| 96 |
return result, formatted_text
|
| 97 |
|
| 98 |
-
def format_response_text(result):
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
formatted = f"""📧 **Email Response Generated**
|
| 103 |
|
| 104 |
**Type:** {result.get('type', 'N/A').title()}
|
|
|
|
| 95 |
formatted_text = format_response_text(result)
|
| 96 |
return result, formatted_text
|
| 97 |
|
| 98 |
+
def format_response_text(result):
|
| 99 |
+
"""Format JSON response into readable text"""
|
| 100 |
+
if not result:
|
| 101 |
+
return "No response generated."
|
| 102 |
formatted = f"""📧 **Email Response Generated**
|
| 103 |
|
| 104 |
**Type:** {result.get('type', 'N/A').title()}
|