Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -87,17 +87,17 @@ def analyze_messages(input_text):
|
|
87 |
|
88 |
|
89 |
# Prepare the output result with just pattern count and dynamic resources
|
90 |
-
result_md = (
|
91 |
f"**Abuse Pattern Count:** {pattern_count}\n\n"
|
92 |
f"**Support Resources:**\n{resources}"
|
93 |
)
|
94 |
|
95 |
# Save the result to a temporary text file for download
|
96 |
-
with tempfile.NamedTemporaryFile(delete=False, suffix=".txt", mode="w") as f:
|
97 |
f.write(result_md)
|
98 |
report_path = f.name
|
99 |
|
100 |
-
|
101 |
|
102 |
# Build the Gradio interface
|
103 |
with gr.Blocks() as demo:
|
|
|
87 |
|
88 |
|
89 |
# Prepare the output result with just pattern count and dynamic resources
|
90 |
+
result_md = (
|
91 |
f"**Abuse Pattern Count:** {pattern_count}\n\n"
|
92 |
f"**Support Resources:**\n{resources}"
|
93 |
)
|
94 |
|
95 |
# Save the result to a temporary text file for download
|
96 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".txt", mode="w") as f:
|
97 |
f.write(result_md)
|
98 |
report_path = f.name
|
99 |
|
100 |
+
return result_md, report_path
|
101 |
|
102 |
# Build the Gradio interface
|
103 |
with gr.Blocks() as demo:
|