Spaces:
Sleeping
Sleeping
CB commited on
Update streamlit_app.py
Browse files- streamlit_app.py +17 -0
streamlit_app.py
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# streamlit_app.py
|
| 2 |
import os
|
| 3 |
import time
|
|
|
|
| 1 |
+
import os, sys
|
| 2 |
+
import google.generativeai as gen
|
| 3 |
+
import inspect
|
| 4 |
+
|
| 5 |
+
def env_check():
|
| 6 |
+
return {
|
| 7 |
+
"ver": getattr(gen, "__version__", None),
|
| 8 |
+
"file": getattr(gen, "__file__", None),
|
| 9 |
+
"has_responses": hasattr(gen, "responses"),
|
| 10 |
+
"has_GenerativeModel": hasattr(gen, "GenerativeModel"),
|
| 11 |
+
"has_generate": hasattr(gen, "generate"),
|
| 12 |
+
"python_version": sys.version,
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
if __name__ == "__main__":
|
| 16 |
+
print(env_check())
|
| 17 |
+
|
| 18 |
# streamlit_app.py
|
| 19 |
import os
|
| 20 |
import time
|