GSridhar1982 commited on
Commit
efa70de
·
verified ·
1 Parent(s): e4e56de

Changes to app file

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
  import nltk
3
  nltk.download('punkt')
@@ -12,14 +13,14 @@ def generate_subject(model_name,email_body):
12
  predicted_title = nltk.sent_tokenize(decoded_output.strip())[0]
13
  return predicted_title
14
 
15
- import gradio as gr
16
  iface = gr.Interface(
17
  fn=generate_subject,
18
  inputs=[
19
  gr.Dropdown(choices=["anukvma/t5-base-medium-email-subject-generation-v2", "anukvma/bart-base-medium-email-subject-generation-v5"], label="Select Model"),
20
  gr.Textbox(lines=5, label="Email Body")
21
  ],
22
- outputs=gr.Textbox(label="Email Summary")
23
  )
24
 
25
  iface.launch()
 
1
+ import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
  import nltk
4
  nltk.download('punkt')
 
13
  predicted_title = nltk.sent_tokenize(decoded_output.strip())[0]
14
  return predicted_title
15
 
16
+
17
  iface = gr.Interface(
18
  fn=generate_subject,
19
  inputs=[
20
  gr.Dropdown(choices=["anukvma/t5-base-medium-email-subject-generation-v2", "anukvma/bart-base-medium-email-subject-generation-v5"], label="Select Model"),
21
  gr.Textbox(lines=5, label="Email Body")
22
  ],
23
+ outputs=gr.Textbox(label="Model Summary")
24
  )
25
 
26
  iface.launch()