rameshmoorthy commited on
Commit
06350c8
1 Parent(s): a16f41b

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +21 -5
functions.py CHANGED
@@ -8,16 +8,32 @@ from sklearn.preprocessing import LabelEncoder
8
  from tempfile import NamedTemporaryFile
9
  import matplotlib.pyplot as plt
10
  import plotly.express as px
11
-
12
 
13
  from wordcloud import WordCloud
14
 
15
 
16
  def process_file_bm25(file,mode,min_cluster_size,top_n_words,ngram):
17
- # Read the Excel sheet or CSV file
18
- x=pip show scipy
19
- y=pip show plotly
20
- z=pip show numpy
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  print(x,y,z)
22
  if file.name.endswith('.csv'):
23
  df = pd.read_csv(file)
 
8
  from tempfile import NamedTemporaryFile
9
  import matplotlib.pyplot as plt
10
  import plotly.express as px
11
+ import subprocess
12
 
13
  from wordcloud import WordCloud
14
 
15
 
16
  def process_file_bm25(file,mode,min_cluster_size,top_n_words,ngram):
17
+
18
+
19
+
20
+ # Run the shell command and capture its output
21
+ x = subprocess.check_output(["pip", "show", "scipy"])
22
+
23
+ # Decode the byte string output to a regular string
24
+ x = x.decode("utf-8")
25
+ # Run the shell command and capture its output
26
+ y = subprocess.check_output(["pip", "show", "numpy"])
27
+
28
+ # Decode the byte string output to a regular string
29
+ y = y.decode("utf-8")
30
+ # Run the shell command and capture its output
31
+ z = subprocess.check_output(["pip", "show", "plotly"])
32
+
33
+ # Decode the byte string output to a regular string
34
+ z = z.decode("utf-8")
35
+ # Print the output
36
+
37
  print(x,y,z)
38
  if file.name.endswith('.csv'):
39
  df = pd.read_csv(file)