SamanthaStorm commited on
Commit
5a8477a
·
verified ·
1 Parent(s): 9ee4a74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- return result_md, report_path
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: