QuantumLearner commited on
Commit
37e829c
·
verified ·
1 Parent(s): 15545df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -0
app.py CHANGED
@@ -8,6 +8,37 @@ import io
8
  from fpdf import FPDF
9
  from datetime import datetime
10
  import uuid
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  # Apply nest_asyncio for asyncio support in Streamlit
13
  nest_asyncio.apply()
 
8
  from fpdf import FPDF
9
  from datetime import datetime
10
  import uuid
11
+ import importlib.metadata
12
+
13
+ # For third-party libraries
14
+ def get_version(package_name, module=None):
15
+ try:
16
+ if module and hasattr(module, '__version__'):
17
+ version = module.__version__
18
+ else:
19
+ version = importlib.metadata.version(package_name)
20
+ print(f"{package_name} version: {version}")
21
+ except AttributeError:
22
+ print(f"{package_name} does not have a __version__ attribute.")
23
+ except importlib.metadata.PackageNotFoundError:
24
+ print(f"{package_name} is not installed.")
25
+
26
+ # Check versions
27
+ get_version('streamlit', st)
28
+ get_version('gpt_researcher')
29
+ get_version('nest_asyncio', nest_asyncio)
30
+ get_version('fpdf')
31
+
32
+ # For standard library modules
33
+ standard_libs = ['os', 'asyncio', 'contextlib', 'io', 'datetime', 'uuid']
34
+ print("\nStandard Library Modules:")
35
+ for lib in standard_libs:
36
+ print(f"{lib} is part of the Python Standard Library and does not have a separate version number.")
37
+
38
+
39
+
40
+
41
+
42
 
43
  # Apply nest_asyncio for asyncio support in Streamlit
44
  nest_asyncio.apply()