Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,6 @@ text = st.text_area("Enter the news article text here:")
|
|
17 |
if st.button("Classify"):
|
18 |
# Perform text summarization
|
19 |
summary = summarizer_ntg(text)[0]['summary_text']
|
20 |
-
|
21 |
-
# Move inputs and model to the same device (GPU or CPU)
|
22 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
23 |
-
summary = {k: v.to(device) for k, v in inputs.items()}
|
24 |
-
model_bb.to(device)
|
25 |
|
26 |
# Perform text classification
|
27 |
with torch.no_grad():
|
|
|
17 |
if st.button("Classify"):
|
18 |
# Perform text summarization
|
19 |
summary = summarizer_ntg(text)[0]['summary_text']
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
# Perform text classification
|
22 |
with torch.no_grad():
|