Mahmoud Amiri
commited on
Commit
·
8aa76ff
1
Parent(s):
f56d332
add temp cell to print version number
Browse files
app.py
CHANGED
|
@@ -63,3 +63,12 @@ with gr.Blocks() as demo:
|
|
| 63 |
outputs=output_text)
|
| 64 |
|
| 65 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
outputs=output_text)
|
| 64 |
|
| 65 |
demo.launch()
|
| 66 |
+
import pkg_resources
|
| 67 |
+
|
| 68 |
+
# List only specific packages (e.g., gradio, transformers, etc.)
|
| 69 |
+
for package_name in ["gradio", "transformers", "torch", "sentencepiece"]:
|
| 70 |
+
try:
|
| 71 |
+
version = pkg_resources.get_distribution(package_name).version
|
| 72 |
+
print(f"{package_name}=={version}")
|
| 73 |
+
except pkg_resources.DistributionNotFound:
|
| 74 |
+
print(f"{package_name} not installed")
|