Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,14 @@ import asyncio
|
|
5 |
sys.path.append("/home/user/app/components")
|
6 |
from HuggingFaceHelper import HuggingFaceHelper
|
7 |
from AICoreAGIX_with_TB import AICoreAGIX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
import tensorflow as tf
|
9 |
|
10 |
# Limit GPU memory usage (important for low-memory environments)
|
|
|
5 |
sys.path.append("/home/user/app/components")
|
6 |
from HuggingFaceHelper import HuggingFaceHelper
|
7 |
from AICoreAGIX_with_TB import AICoreAGIX
|
8 |
+
import os
|
9 |
+
os.environ["TF_FORCE_GPU_ALLOW_GROWTH"] = "true"
|
10 |
+
|
11 |
+
import tensorflow as tf
|
12 |
+
tf.config.set_logical_device_configuration(
|
13 |
+
tf.config.list_physical_devices('CPU')[0],
|
14 |
+
[tf.config.LogicalDeviceConfiguration(memory_limit=2048)]
|
15 |
+
)
|
16 |
import tensorflow as tf
|
17 |
|
18 |
# Limit GPU memory usage (important for low-memory environments)
|