Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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":
|