Updated
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import nltk
|
|
4 |
nltk.download('punkt')
|
5 |
|
6 |
def generate_subject(email_body):
|
7 |
-
model_name =
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
10 |
inputs = ["provide email subject: " + email_body]
|
@@ -23,4 +23,4 @@ iface = gr.Interface(
|
|
23 |
description="Given the email body, it generates the email subject"
|
24 |
)
|
25 |
|
26 |
-
iface.launch(
|
|
|
4 |
nltk.download('punkt')
|
5 |
|
6 |
def generate_subject(email_body):
|
7 |
+
model_name = 'anukvma/t5-base-medium-email-subject-generation-v2'
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
10 |
inputs = ["provide email subject: " + email_body]
|
|
|
23 |
description="Given the email body, it generates the email subject"
|
24 |
)
|
25 |
|
26 |
+
iface.launch()
|