aleks-wordcab commited on
Commit
935d87e
Β·
verified Β·
1 Parent(s): 215b26b

Remove personal hotel email example and update hardware info to CPU

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +2 -20
README.md CHANGED
@@ -12,7 +12,7 @@ models:
12
  - wordcab/t5-small-email-summarizer
13
  datasets:
14
  - argilla/FinePersonas-Conversations-Email-Summaries
15
- space_hardware: "t4-small"
16
  ---
17
 
18
  # T5 Email Summarizer - Interactive Demo v3
@@ -29,7 +29,7 @@ This Space provides an interactive demo of the [wordcab/t5-small-email-summarize
29
  ## Features
30
 
31
  - 🎯 **Dual-mode summarization**: Brief (1-2 sentences) or Full (detailed)
32
- - πŸš€ **Fast inference**: Under 1 second on T4 GPU
33
  - πŸ’ͺ **Robust**: Handles typos, abbreviations, and informal language
34
  - πŸ”„ **Auto-detect**: Automatically chooses brief or full based on email length
35
  - πŸ”§ **Smart preprocessing**: General solution for title and unicode issues
 
12
  - wordcab/t5-small-email-summarizer
13
  datasets:
14
  - argilla/FinePersonas-Conversations-Email-Summaries
15
+ space_hardware: "cpu-basic"
16
  ---
17
 
18
  # T5 Email Summarizer - Interactive Demo v3
 
29
  ## Features
30
 
31
  - 🎯 **Dual-mode summarization**: Brief (1-2 sentences) or Full (detailed)
32
+ - πŸš€ **Fast inference**: Quick processing even on CPU
33
  - πŸ’ͺ **Robust**: Handles typos, abbreviations, and informal language
34
  - πŸ”„ **Auto-detect**: Automatically chooses brief or full based on email length
35
  - πŸ”§ **Smart preprocessing**: General solution for title and unicode issues
app.py CHANGED
@@ -236,24 +236,6 @@ def summarize_email(subject, body, summary_type, temperature=0.7, max_length=150
236
 
237
  # Example emails
238
  examples = [
239
- [
240
- "RE: Mia Saigon - Mr. Aleksandr Smechov & Mrs. Duong Thi Thu Nha (Ms. Yana) - 1642373580 - 26 August 2025",
241
- """Dear Mr. Aleks,
242
-
243
- "Xin ChΓ o" from Mia Saigon Luxury Boutique Hotel!
244
-
245
- Thank you very much for your continued support. We are truly delighted to welcome you and Ms. Yana for her upcoming birthday celebration.
246
-
247
- Regarding your inquiry, we are pleased to inform you that we do provide in-room decoration services, flower bouquets, and birthday cakes, as detailed in the attached files.
248
-
249
- Please kindly note that all services must be booked at least 48 hours (02 days) in advance and are subject to availability.
250
-
251
- Best regards,
252
- Mia Saigon Team""",
253
- "Brief (1-2 sentences)",
254
- 0.7,
255
- 150
256
- ],
257
  [
258
  "Quarterly Budget Review Meeting",
259
  """Dear Team,
@@ -329,7 +311,7 @@ with gr.Blocks(title="T5 Email Summarizer", theme=gr.themes.Soft()) as demo:
329
 
330
  πŸ€– **Model:** [wordcab/t5-small-email-summarizer](https://huggingface.co/wordcab/t5-small-email-summarizer)
331
  | πŸ“Š **Dataset:** [argilla/FinePersonas-Conversations-Email-Summaries](https://huggingface.co/datasets/argilla/FinePersonas-Conversations-Email-Summaries)
332
- | πŸš€ **Powered by:** T4 GPU
333
  """)
334
 
335
  with gr.Row():
@@ -417,7 +399,7 @@ with gr.Blocks(title="T5 Email Summarizer", theme=gr.themes.Soft()) as demo:
417
  - **Dual-mode**: Get brief or detailed summaries on demand
418
  - **Robust**: Handles typos, abbreviations, and informal language
419
  - **Smart normalization**: Automatically handles titles (Mr., Dr., Prof., etc.)
420
- - **Fast**: Processes emails in under 1 second on T4 GPU
421
 
422
  ### πŸ”§ Preprocessing Features:
423
  - **Title Normalization**: Converts "Mr." β†’ "Mr", "Dr." β†’ "Dr" to avoid tokenization issues
 
236
 
237
  # Example emails
238
  examples = [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  [
240
  "Quarterly Budget Review Meeting",
241
  """Dear Team,
 
311
 
312
  πŸ€– **Model:** [wordcab/t5-small-email-summarizer](https://huggingface.co/wordcab/t5-small-email-summarizer)
313
  | πŸ“Š **Dataset:** [argilla/FinePersonas-Conversations-Email-Summaries](https://huggingface.co/datasets/argilla/FinePersonas-Conversations-Email-Summaries)
314
+ | πŸš€ **Running on:** CPU (Free tier)
315
  """)
316
 
317
  with gr.Row():
 
399
  - **Dual-mode**: Get brief or detailed summaries on demand
400
  - **Robust**: Handles typos, abbreviations, and informal language
401
  - **Smart normalization**: Automatically handles titles (Mr., Dr., Prof., etc.)
402
+ - **Fast**: Processes emails quickly even on CPU
403
 
404
  ### πŸ”§ Preprocessing Features:
405
  - **Title Normalization**: Converts "Mr." β†’ "Mr", "Dr." β†’ "Dr" to avoid tokenization issues