Spaces:
Sleeping
Sleeping
Update themes-ui.py
Browse files- themes-ui.py +0 -25
themes-ui.py
CHANGED
@@ -12,31 +12,6 @@ from typing import Dict, List, Optional
|
|
12 |
import google.generativeai as genai
|
13 |
import plotly.express as px
|
14 |
|
15 |
-
|
16 |
-
# Handle required package installations and imports
|
17 |
-
def install_package(package_name: str) -> None:
|
18 |
-
try:
|
19 |
-
subprocess.check_call(
|
20 |
-
[sys.executable, "-m", "pip", "install", package_name],
|
21 |
-
stdout=subprocess.DEVNULL,
|
22 |
-
stderr=subprocess.DEVNULL
|
23 |
-
)
|
24 |
-
except subprocess.CalledProcessError as e:
|
25 |
-
st.error(f"Failed to install {package_name}: {str(e)}")
|
26 |
-
sys.exit(1)
|
27 |
-
try:
|
28 |
-
import google.generativeai as genai
|
29 |
-
except ImportError:
|
30 |
-
install_package("google-generativeai")
|
31 |
-
import google.generativeai as genai
|
32 |
-
|
33 |
-
# Import Plotly
|
34 |
-
try:
|
35 |
-
import plotly.express as px
|
36 |
-
except ImportError:
|
37 |
-
install_package("plotly")
|
38 |
-
import plotly.express as px
|
39 |
-
# Set up the application title and layout
|
40 |
st.set_page_config(
|
41 |
page_title="Steam App Reviews - Themes Analysis",
|
42 |
page_icon="🎮",
|
|
|
12 |
import google.generativeai as genai
|
13 |
import plotly.express as px
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
st.set_page_config(
|
16 |
page_title="Steam App Reviews - Themes Analysis",
|
17 |
page_icon="🎮",
|