Spaces:
Runtime error
Runtime error
Commit History
-
Update app.py
Verified signature755b8ed
-
Update app.py
Verified signature7549e78 -
Upload app.py
Verified signature1690c98 -
Update app_py.py
Verified signature25d1474 -
Upload app_py.py
Verified signatureda1a8ab -
Delete app.pyβ
Verified signatureimport subprocess import sys import os import re # Import the regular expression module import shutil # Import the shutil module def install_tensorflow(): """ Installs TensorFlow using pip, targeting the *current* Python environment. Handles potential errors during the installation. Also checks if the installation was successful. """ try: print("Installing TensorFlow...") # Use sys.executable to ensure we're using the correct pip for the current Python interpreter result = subprocess.run( [sys.executable, "-m", "pip", "install", "tensorflow"], check=False, # Do NOT use check=True here. We'll handle errors ourselves. stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, ) print("pip install output (stdout):") print(result.stdout) print("pip install error output (stderr):") print(result.stderr) # Check for successful installatiβ¦eff526b -
Update app.py
Verified signature78178f3 -
Update app.py
Verified signature14162a0 -
Update app.py
Verified signature0438970 -
Update app.py
Verified signature1a690f7 -
Update app.py
Verified signature9c57b99 -
Update app.py
Verified signature53148a9 -
Create app.py
Verified signaturedae8b49 -
Delete app.pyβ
Verified signatureimport subprocess import sys import os def install_tensorflow(): """ Installs TensorFlow using pip. Handles potential errors during the installation. """ try: print("Installing TensorFlow...") result = subprocess.run( [sys.executable, "-m", "pip", "install", "tensorflow"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, ) print("TensorFlow installed successfully.") print(result.stdout) except subprocess.CalledProcessError as e: print(f"Error installing TensorFlow: {e}") print(f"Error output (stderr):\n{e.stderr}") print("Please check your pip installation and internet connection.") print("You may need to install TensorFlow manually. Instructions can be found at:") print("https://www.tensorflow.org/install") sys.exit(1) except Exception as ex: print(f"An unexpected error occurred durβ¦0ac8ba8 -
Update app.py
Verified signatured8be1c6 -
Update app.py
Verified signatureeea2cd1 -
appy.py
Verified signaturefe5961b -
Create app.py
Verified signature5aab96e -
Upload resnet50_code.py
Verified signatureda2f552 -
initial commit
Verified signaturee78c883