Spaces:
Runtime error
Runtime error
Commit
·
babd8b5
1
Parent(s):
3ea2ff8
update
Browse files
app.py
CHANGED
@@ -8,6 +8,15 @@ import mediapipe as mp
|
|
8 |
# Load the model
|
9 |
import os
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
model_path = os.path.abspath('sign_asl_cnn_30_epochs.h5')
|
12 |
if os.path.exists(model_path):
|
13 |
# Load the model
|
|
|
8 |
# Load the model
|
9 |
import os
|
10 |
|
11 |
+
# Set environment variables
|
12 |
+
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # Suppress TensorFlow warnings
|
13 |
+
os.environ['CUDA_VISIBLE_DEVICES'] = '0' # Specify GPU device index
|
14 |
+
|
15 |
+
# Specify GPU configuration
|
16 |
+
config = tf.compat.v1.ConfigProto()
|
17 |
+
config.gpu_options.allow_growth = True
|
18 |
+
session = tf.compat.v1.Session(config=config)
|
19 |
+
|
20 |
model_path = os.path.abspath('sign_asl_cnn_30_epochs.h5')
|
21 |
if os.path.exists(model_path):
|
22 |
# Load the model
|