Surendradjh commited on
Commit
cbc6fd4
·
verified ·
1 Parent(s): bb36876

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,9 +8,9 @@ choice = st.sidebar.radio("Choose Task Type",
8
  ("Sentiment Analysis", "Text Summarization", "Text Generation"))
9
 
10
  # Load pipelines (load once at top)
11
- sentiment = pipeline("text-classification", model="cardiffnlp/twitter-roberta-base-sentiment-latest")
12
- summary = pipeline("summarization", model="facebook/bart-large-cnn")
13
- generation = pipeline("text-generation", model="openai-community/gpt2")
14
 
15
  # -------- Sentiment Analysis --------
16
  if choice == "Sentiment Analysis":
 
8
  ("Sentiment Analysis", "Text Summarization", "Text Generation"))
9
 
10
  # Load pipelines (load once at top)
11
+ sentiment = pipeline("text-classification", model="cardiffnlp/twitter-roberta-base-sentiment-latest", device=-1)
12
+ summary = pipeline("summarization", model="facebook/bart-large-cnn", device=-1)
13
+ generation = pipeline("text-generation", model="openai-community/gpt2", device=-1)
14
 
15
  # -------- Sentiment Analysis --------
16
  if choice == "Sentiment Analysis":