ccxccc commited on
Commit
4a1e5e6
·
verified ·
1 Parent(s): 154bd0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -12,12 +12,12 @@ def check_installation(package):
12
  else:
13
  return True
14
 
15
- def install_tensorflow():
16
  try:
17
- subprocess.check_call(['pip', 'install', 'tensorflow==2.0'])
18
  return True
19
  except subprocess.CalledProcessError as e:
20
- st.error(f"TensorFlow installation failed with error: {e}")
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("tensorflow"):
62
- st.write("TensorFlow 2.0 is not installed. Installing...")
63
- if install_tensorflow():
64
- st.success("TensorFlow 2.0 has been successfully installed.")
65
  else:
66
- st.error("Failed to install TensorFlow 2.0. Please install it manually and retry.")
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