Zayed024 commited on
Commit
8076129
1 Parent(s): dbe94c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -3,7 +3,7 @@ warnings.filterwarnings('ignore')
3
  !pip install torch
4
  import os
5
  import gradio as gr
6
- import torch
7
 
8
  import tempfile
9
  import numpy as np
@@ -15,6 +15,12 @@ from nltk import pos_tag
15
  from nltk.corpus import stopwords
16
  from pdfminer.high_level import extract_text
17
  from nltk.tokenize.texttiling import TextTilingTokenizer
 
 
 
 
 
 
18
 
19
  co = cohere.Client(os.environ.get("CO_API_KEY"))
20
 
 
3
  !pip install torch
4
  import os
5
  import gradio as gr
6
+
7
 
8
  import tempfile
9
  import numpy as np
 
15
  from nltk.corpus import stopwords
16
  from pdfminer.high_level import extract_text
17
  from nltk.tokenize.texttiling import TextTilingTokenizer
18
+ # Download necessary NLTK data
19
+ nltk.download('punkt')
20
+ nltk.download('stopwords')
21
+
22
+ # Download spaCy model
23
+ spacy.cli.download("en_core_web_sm")
24
 
25
  co = cohere.Client(os.environ.get("CO_API_KEY"))
26