Erfan11 commited on
Commit
02b76f2
1 Parent(s): 6bd167a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -65,4 +65,24 @@ def process_image():
65
 
66
  if __name__ == '__main__':
67
  # Run the app
68
- app.run(host='0.0.0.0', port=5000, debug=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  if __name__ == '__main__':
67
  # Run the app
68
+ app.run(host='0.0.0.0', port=5000, debug=True)
69
+ import os
70
+ os.environ["TF_ENABLE_ONEDNN_OPTS"] = "0"
71
+ import tensorflow as tf
72
+ print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
73
+ import os
74
+ import tensorflow as tf
75
+
76
+ # Set environment variable
77
+ os.environ["TF_ENABLE_ONEDNN_OPTS"] = "0"
78
+
79
+ # Check GPU availability
80
+ print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
81
+
82
+ # Your main code goes here
83
+ def main():
84
+ # Your application code
85
+ pass
86
+
87
+ if __name__ == "__main__":
88
+ main()