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

tested with using openai-community/gpt2

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -15,7 +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
  except Exception as e:
20
  print(f"Error loading model: {e}")
21
  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