inie2003 commited on
Commit
35c3575
1 Parent(s): 2738ccd

removed memory profiler

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -6,8 +6,7 @@ from helper import (
6
  )
7
  import os
8
  import time
9
- import psutil
10
- from memory_profiler import memory_usage
11
 
12
  # Load environment variables
13
  AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID")
@@ -30,11 +29,7 @@ folder_path_dict = {
30
  # AWS S3 bucket name
31
  bucket_name = "datasets-quasara-io"
32
 
33
- # Function to display CPU and memory usage
34
- def display_usage():
35
- process = psutil.Process(os.getpid())
36
- st.write(f"CPU usage: {process.cpu_percent()}%")
37
- st.write(f"Memory usage: {process.memory_info().rss / (1024 ** 2)} MB")
38
 
39
  # Streamlit App
40
  def main():
@@ -96,8 +91,6 @@ def main():
96
  loading_dataset_text.text("Dataset loaded successfully!")
97
  st.success(f"Dataset loaded successfully with {len(df)} rows.")
98
 
99
- # Display CPU and memory usage
100
- display_usage()
101
 
102
  except Exception as e:
103
  st.error(f"Failed to load dataset: {e}")
@@ -146,8 +139,6 @@ def main():
146
  else:
147
  st.write("No results found.")
148
 
149
- # Display CPU and memory usage
150
- display_usage()
151
 
152
  except Exception as e:
153
  st.error(f"Search failed: {e}")
 
6
  )
7
  import os
8
  import time
9
+
 
10
 
11
  # Load environment variables
12
  AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID")
 
29
  # AWS S3 bucket name
30
  bucket_name = "datasets-quasara-io"
31
 
32
+
 
 
 
 
33
 
34
  # Streamlit App
35
  def main():
 
91
  loading_dataset_text.text("Dataset loaded successfully!")
92
  st.success(f"Dataset loaded successfully with {len(df)} rows.")
93
 
 
 
94
 
95
  except Exception as e:
96
  st.error(f"Failed to load dataset: {e}")
 
139
  else:
140
  st.write("No results found.")
141
 
 
 
142
 
143
  except Exception as e:
144
  st.error(f"Search failed: {e}")