sohail-shaikh-s07 commited on
Commit
746134a
·
verified ·
1 Parent(s): 4f979e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,8 +15,8 @@ except Exception as e:
15
 
16
  try:
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
18
- #summarizer = pipeline("summarization", model="facebook/bart-large-cnn", device=device) # I have used BART-Large-CNN, you can use any model as per your preference like gpt2, t5, etc
19
- summarizer = pipeline("summarization", model="openai-community/gpt2", device=device)
20
  except Exception as e:
21
  print(f"Error loading model: {e}")
22
  summarizer = None
 
15
 
16
  try:
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
18
+ summarizer = pipeline("summarization", model="facebook/bart-large-cnn", device=device) # I have used BART-Large-CNN, you can use any model as per your preference like gpt2, t5, etc
19
+ #summarizer = pipeline("summarization", model="openai-community/gpt2", device=device)
20
  except Exception as e:
21
  print(f"Error loading model: {e}")
22
  summarizer = None