ccxccc
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -12,12 +12,12 @@ def check_installation(package):
|
|
12 |
else:
|
13 |
return True
|
14 |
|
15 |
-
def
|
16 |
try:
|
17 |
-
subprocess.check_call(['pip', 'install', '
|
18 |
return True
|
19 |
except subprocess.CalledProcessError as e:
|
20 |
-
st.error(f"
|
21 |
return False
|
22 |
|
23 |
def summarize(result):
|
@@ -58,12 +58,12 @@ def get_transcript(video_link):
|
|
58 |
st.write("Invalid YouTube video link")
|
59 |
|
60 |
def main():
|
61 |
-
if not check_installation("
|
62 |
-
st.write("
|
63 |
-
if
|
64 |
-
st.success("
|
65 |
else:
|
66 |
-
st.error("Failed to install
|
67 |
return
|
68 |
|
69 |
import tensorflow as tf
|
|
|
12 |
else:
|
13 |
return True
|
14 |
|
15 |
+
def install_tf_keras():
|
16 |
try:
|
17 |
+
subprocess.check_call(['pip', 'install', 'tf-keras'])
|
18 |
return True
|
19 |
except subprocess.CalledProcessError as e:
|
20 |
+
st.error(f"Failed to install tf-keras package: {e}")
|
21 |
return False
|
22 |
|
23 |
def summarize(result):
|
|
|
58 |
st.write("Invalid YouTube video link")
|
59 |
|
60 |
def main():
|
61 |
+
if not check_installation("tf_keras"):
|
62 |
+
st.write("tf-keras is not installed. Installing...")
|
63 |
+
if install_tf_keras():
|
64 |
+
st.success("tf-keras has been successfully installed.")
|
65 |
else:
|
66 |
+
st.error("Failed to install tf-keras. Please install it manually and retry.")
|
67 |
return
|
68 |
|
69 |
import tensorflow as tf
|